MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / rectFromCenterPoint

Function rectFromCenterPoint

Gui/HostOverlay.cpp:1849–1863  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1847}
1848
1849static OfxRectD
1850rectFromCenterPoint(const OfxPointD& center,
1851 const OfxPointD& pixelScale)
1852{
1853 // we are not axis-aligned
1854 double meanPixelScale = (pixelScale.x + pixelScale.y) / 2.;
1855 OfxRectD ret;
1856
1857 ret.x1 = center.x - (TransformInteract::pointSize() / 2.) * meanPixelScale;
1858 ret.x2 = center.x + (TransformInteract::pointSize() / 2.) * meanPixelScale;
1859 ret.y1 = center.y - (TransformInteract::pointSize() / 2.) * meanPixelScale;
1860 ret.y2 = center.y + (TransformInteract::pointSize() / 2.) * meanPixelScale;
1861
1862 return ret;
1863}
1864
1865bool
1866TransformInteract::penMotion(double time,

Callers 2

penMotionMethod · 0.85
penDownMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected