geometry: constructor for SHAPE_RECT from a BOX2
This commit is contained in:
parent
7e8f14e738
commit
2746be30c1
|
@ -46,6 +46,16 @@ public:
|
||||||
m_h( 0 )
|
m_h( 0 )
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a rectangle defined by a BOX2.
|
||||||
|
*/
|
||||||
|
SHAPE_RECT( const BOX2I& aBox ) :
|
||||||
|
SHAPE( SH_RECT ),
|
||||||
|
m_p0( aBox.GetPosition() ),
|
||||||
|
m_w( aBox.GetWidth() ),
|
||||||
|
m_h( aBox.GetHeight() )
|
||||||
|
{}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a rectangle defined by top-left corner (aX0, aY0), width aW and height aH.
|
* Create a rectangle defined by top-left corner (aX0, aY0), width aW and height aH.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue