MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / transformBox

Method transformBox

src/app/transformation.cpp:41–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void Transformation::transformBox(Corners& corners) const
42{
43 // TODO We could create a composed 4x4 matrix with all
44 // transformation and apply the same matrix to avoid calling
45 // rotatePoint/cos/sin functions 4 times, anyway, it's not
46 // critical at this point.
47
48 corners = m_bounds;
49 for (std::size_t c=0; c<corners.size(); ++c)
50 corners[c] = Transformation::rotatePoint(corners[c], m_pivot, m_angle);
51}
52
53void Transformation::displacePivotTo(const PointF& newPivot)
54{

Callers 8

moveImageMethod · 0.80
dropImageTemporarilyMethod · 0.80
drawImageMethod · 0.80
drawMaskMethod · 0.80
getHandleAtPointMethod · 0.80
drawHandlesMethod · 0.80
invalidateHandlesMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected