1 #include "shapes/path_vertex.hpp"
2 #include "shapes/path.hpp"
6 Vec2D PathVertex::renderTranslation()
10 return m_Weight->translation();
12 return Vec2D(x(), y());
15 StatusCode PathVertex::onAddedDirty(CoreContext* context)
17 StatusCode code = Super::onAddedDirty(context);
18 if (code != StatusCode::Ok)
22 if (!parent()->is<Path>())
24 return StatusCode::MissingObject;
26 parent()->as<Path>()->addVertex(this);
27 return StatusCode::Ok;
30 void PathVertex::markPathDirty()
32 if (parent() == nullptr)
34 // This is an acceptable condition as the parametric paths create points
35 // that are not part of the core context.
38 parent()->as<Path>()->markPathDirty();
41 void PathVertex::xChanged() { markPathDirty(); }
42 void PathVertex::yChanged() { markPathDirty(); }
44 void PathVertex::deform(Mat2D& worldTransform, float* boneTransforms)
52 m_Weight->translation());