策略抽离

This commit is contained in:
2026-08-02 14:20:27 +08:00
parent 6d000f43b4
commit 2df8959ed6
87 changed files with 2454 additions and 1390 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ int Time_Axis::append_time(Time_Of_Day time) {
Time_Of_Day Time_Axis::tick_to_time(int tick) {
auto stream = timeline_stream();
if (stream)
return stream->capture(visible_time_point_count(), d()->state_data(State_Edit)->label_tick_interval_hint(), newest_at_axis_start()).time_by_tick(tick);
return stream->capture(visible_time_point_count(), d()->edit_state()->label_tick_interval_hint(), newest_at_axis_start()).time_by_tick(tick);
return d()->time_by_tick(tick);
}
Time_Axis::Builder::Builder(std::shared_ptr<Renderable> parent, Orientation orientation) {
@@ -54,7 +54,7 @@ std::shared_ptr<Time_Axis> Time_Axis::Builder::build() {
auto ret = renderive::make_shared<Time_Axis>();
set(ret.get());
Time_Axis_Private* pd = ret->d();
Time_Axis_Render_State* sc = reinterpret_cast<Time_Axis_Render_State*>(pd->state(State_Edit));
Time_Axis_Render_State* sc = reinterpret_cast<Time_Axis_Render_State*>(pd->edit_state());
PROP_R(int, visible_time_point_count)
PROP_R(int, tick_label_spacing_px)
PROP_R(std::string, time_format)