四个方向 分块渲染

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
+13 -14
View File
@@ -1054,25 +1054,24 @@ private:
const int bottom = 46;
const int width = std::max(1, viewport.width - left - right);
const int height = std::max(1, viewport.height - top - bottom);
if (const auto horizontal = horizontal_axis()) {
update_axis_state(horizontal, [=](Axis_Base_Properties& axis) {
const auto layout_axis = [=](const std::shared_ptr<Abs_Axis>& target) {
if (!target)
return;
update_axis_state(target, [=](Axis_Base_Properties& axis) {
axis.x = left;
axis.y = top + height;
axis.pixel_length = static_cast<std::size_t>(width);
axis.y = axis.orientation == Orientation::Horizontal ? top + height : top;
axis.pixel_length = static_cast<std::size_t>(
axis.orientation == Orientation::Horizontal ? width : height);
});
}
if (const auto vertical = vertical_axis()) {
update_axis_state(vertical, [=](Axis_Base_Properties& axis) {
axis.x = left;
axis.y = top;
axis.pixel_length = static_cast<std::size_t>(height);
});
}
};
layout_axis(horizontal_axis());
layout_axis(vertical_axis());
if (case_id_ == "axis_lab" && time_axis_) {
time_axis_->update([&](auto& axis) {
axis.x = left;
axis.y = 26;
axis.pixel_length = static_cast<std::size_t>(width);
axis.y = axis.orientation == Orientation::Horizontal ? 26 : top;
axis.pixel_length = static_cast<std::size_t>(
axis.orientation == Orientation::Horizontal ? width : height);
});
}
}
+3
View File
@@ -348,6 +348,7 @@ struct Type_Descriptor<renderive::web::Gallery_Time_Axis> {
RENDERIVE_GALLERY_DESCRIPTOR(Gallery_Spectrum, Spectrum_Properties, "spectrum", "Spectrum",
property_number<T, &P::frequency_point_size>("frequency_point_size", "Frequency points"),
property_number<T, &P::partition_count>("partition_count", "Render partitions"),
property_object<T, &P::frequency_range>("frequency_range", "Frequency range"),
property_number<T, &P::center_frequency>("center_frequency", "Center frequency"),
property_object<T, &P::sweep_frequency_range>("sweep_frequency_range", "Sweep range"),
@@ -377,6 +378,7 @@ RENDERIVE_GALLERY_DESCRIPTOR(Gallery_Waterfall, Waterfall_Properties, "waterfall
property_object<T, &P::frequency_range>("frequency_range", "Frequency range"),
property_object<T, &P::power_range>("power_range", "Power range"),
property_number<T, &P::frequency_bin_count>("frequency_bin_count", "Frequency bins"),
property_number<T, &P::partition_count>("partition_count", "Render partitions"),
property_boolean<T, &P::visible_range_only>("visible_range_only", "Visible range only"),
property_select<T, &P::interpolation_mode>("interpolation_mode", "Interpolation"),
property_select<T, &P::color_map>("color_map", "Color map"),
@@ -390,6 +392,7 @@ RENDERIVE_GALLERY_DESCRIPTOR(Gallery_Afterglow, Afterglow_Properties, "afterglow
property_object<T, &P::power_range>("power_range", "Power range"),
property_number<T, &P::frequency_point_size>("frequency_point_size", "Frequency points"),
property_number<T, &P::power_point_size>("power_point_size", "Power points"),
property_number<T, &P::partition_count>("partition_count", "Render partitions"),
property_boolean<T, &P::interpolate>("interpolate", "Interpolate power"),
property_number<T, &P::attenuation_rate>("attenuation_rate", "Attenuation"),
property_select<T, &P::color_map>("color_map", "Color map"));