四个方向 分块渲染

This commit is contained in:
2026-08-12 09:01:25 +08:00
parent b34c0d31b1
commit 9331b4cbf6
24 changed files with 788 additions and 108 deletions
+2 -1
View File
@@ -81,7 +81,8 @@ private:
coordinates,
state.orientation == Orientation::Horizontal ? static_cast<double>(state.x)
: static_cast<double>(state.y),
static_cast<double>(state.pixel_length)
static_cast<double>(state.pixel_length),
state.orientation
};
}
+5
View File
@@ -11,6 +11,7 @@ struct Axis_Transform {
Range coordinate_range;
double pixel_origin{};
double pixel_length{};
Orientation orientation = Orientation::Horizontal;
[[nodiscard]] double coord_to_pixel(double coordinate) const noexcept {
const double span = coordinate_range.length();
@@ -23,6 +24,10 @@ struct Axis_Transform {
return coordinate_range.origin;
return coordinate_range.origin + (pixel - pixel_origin) / pixel_length * coordinate_range.length();
}
[[nodiscard]] double point_to_coord(PointF point) const noexcept {
return pixel_to_coord(orientation == Orientation::Horizontal ? point.x : point.y);
}
};
struct Axis_Base_Properties {