结构优化

This commit is contained in:
2026-08-13 15:17:02 +08:00
parent 65cf786e2d
commit e8e8b29806
25 changed files with 822 additions and 461 deletions
+1 -15
View File
@@ -30,11 +30,6 @@ QColor to_qcolor(Color color) {
return QColor(color.r, color.g, color.b, color.a);
}
std::string to_utf8_string(const QString& text) {
const QByteArray bytes = text.toUtf8();
return {bytes.constData(), static_cast<std::size_t>(bytes.size())};
}
} // namespace
Abs_Plot_Private::Abs_Plot_Private(bool continuous_rendering)
@@ -80,19 +75,10 @@ Scene2D* Abs_Plot::scene() const {
return d ? d->scene.get() : nullptr;
}
std::shared_ptr<Renderable> Abs_Plot::root_renderable() const {
renderive_Owner<Renderable> Abs_Plot::root_renderable() const {
return d->scene->root_renderable();
}
std::shared_ptr<Renderable> Abs_Plot::create_renderable_node(
const std::shared_ptr<Renderable>& parent, const QString& object_name) const {
return d->scene->create_renderable_node(parent, to_utf8_string(object_name));
}
void Abs_Plot::remove_renderable(const std::shared_ptr<Renderable>& renderable) {
d->scene->remove_renderable(renderable);
}
QColor Abs_Plot::background_color() const {
return to_qcolor(d->scene->background_color());
}