21 #include <wx/wfstream.h>
24 #include "wx/canvas/eval.h"
32 #if wxART2D_USE_EDITOR
34 #endif //wxART2D_USE_EDITOR
55 m_format = _T(
"%3.0f" );
65 m_format = other.m_format;
78 strTicText.Printf( m_format, dTicValue );
95 wxASSERT_MSG( format.IsEmpty(), wxT(
"format string not supported" ) );
98 wxString a2dTimeTicFormatter::GetTicText(
double dTicValue )
102 wxChar cSeparator = _T(
'\0' );
103 int i, nDivisor[] = { 60, 60, 24 };
105 wxUint32 ulTic = ( wxUint32 ) dTicValue;
112 i0 = 1, ulTic /= nDivisor[0];
116 for ( i = i0; i < 3; i++ )
118 str.Printf( _T(
"%02lu%c" ), ulTic % nDivisor[i], cSeparator );
119 strTicText = str + strTicText;
120 ulTic /= nDivisor[i];
121 cSeparator = _T(
':' );
126 str.Printf( _T(
"%lu%c" ), ulTic, cSeparator );
127 strTicText = str + strTicText;
143 a2dCurveAxis::a2dCurveAxis(
double length,
bool yaxis )
159 m_autosizedtic =
false;
168 m_pTicFormatter->SetAxis(
this );
170 m_font =
a2dFont( 6, wxSWISS, wxITALIC );
173 a2dCurveAxis::~a2dCurveAxis()
179 return new a2dCurveAxis( *
this, options, refs );
182 a2dCurveAxis::a2dCurveAxis(
const a2dCurveAxis& other, CloneOptions options,
a2dRefMap* refs )
187 m_ticheight = other.m_ticheight;
190 m_stroketic = other.m_stroketic;
191 m_stroketictext = other.m_stroketictext;
192 m_strokeunits = other.m_strokeunits;
198 m_stroketic = other.m_stroketic;
199 m_stroketictext = other.m_stroketictext;
200 m_strokeunits = other.m_strokeunits;
201 m_pTicFormatter = other.m_pTicFormatter;
204 m_units = other.m_units;
212 m_sidetic = other.m_sidetic;
213 m_inverttic = other.m_inverttic;
215 m_autosizedtic = other.m_autosizedtic;
216 m_commonTicFormat = other.m_commonTicFormat;
218 #if defined(_DEBUG) && defined (SMART_POINTER_DEBUG)
220 CurrentSmartPointerOwner =
this;
239 if( val < wxMin( min, max ) || val > wxMax( min, max ) )
243 obj->
SetPosXY( 0, ( obj->
GetPosY() - min ) / ( max - min )*curlength );
249 if( val < wxMin( min, max ) || val > wxMax( min, max ) )
253 obj->
SetPosXY( ( obj->
GetPosX() - min ) / ( max - min )*curlength, 0 );
288 double newlength = length != 0 ? length : 1.;
306 #if wxART2D_USE_CVGIO
310 if ( xmlparts == a2dXmlSer_attrib )
312 out.WriteAttribute( wxT(
"min" ) ,
m_min );
313 out.WriteAttribute( wxT(
"max" ) ,
m_max );
314 out.WriteAttribute( wxT(
"ticmin" ) ,
m_ticmin );
315 out.WriteAttribute( wxT(
"ticmax" ) ,
m_ticmax );
316 out.WriteAttribute( wxT(
"yaxis" ) ,
m_yaxis );
317 out.WriteAttribute( wxT(
"showtics" ) ,
m_showtics );
322 out.WriteAttribute( wxT(
"tic" ) , m_tic );
323 out.WriteAttribute( wxT(
"ticheight" ) , m_ticheight );
324 out.WriteAttribute( wxT(
"sidetic" ) , m_sidetic );
326 out.WriteAttribute( wxT(
"position" ) ,
m_position );
327 out.WriteAttribute( wxT(
"inverttic" ) , m_inverttic );
328 out.WriteAttribute( wxT(
"autosizedtic" ) , m_autosizedtic );
330 out.WriteAttribute( wxT(
"units" ) , m_units );
331 out.WriteAttribute( wxT(
"commonFormat" ), m_commonTicFormat );
339 m_stroketic.Save(
this, out, towrite );
340 m_stroketictext.Save(
this, out, towrite );
341 m_strokeunits.Save(
this, out, towrite );
343 m_pTicFormatter->
Save(
this, out, towrite );
352 if ( xmlparts == a2dXmlSer_attrib )
381 m_stroketictext.UnRef();
382 m_strokeunits.UnRef();
384 m_stroketic.Load( parent, parser );
386 m_stroketictext.Load( parent, parser );
388 m_strokeunits.Load( parent, parser );
391 m_pTicFormatter->
Load( parent, parser );
398 #endif //wxART2D_USE_CVGIO
402 m_stroketic = stroke;
408 m_stroketictext = stroke;
412 void a2dCurveAxis::SetUnitsStroke(
const a2dStroke& stroke )
414 m_strokeunits = stroke;
418 void a2dCurveAxis::SetUnitsStroke(
const wxColour& color,
double width,
a2dStrokeStyle style )
420 m_strokeunits =
a2dStroke( color, width, style );
432 int clientw, clienth;
435 if ( clientw == 0 ) clientw = 10;
436 if ( clienth == 0 ) clienth = 10;
460 double worldtic = wxMin( relw, relh ) /
m_length * 15;
462 if( tic > 10 ) tic = int( tic + 0.5 );
473 bool a2dCurveAxis::HasLevelMarkers()
const
497 double tictextheightX = tictextheight;
498 double tictextheightY = tictextheight;
500 a2dNamedProperty* propSpec = PROPID_intViewDependTransform->GetPropertyListOnly(
this );
504 double scalex = propMatrix->GetValue().
Get_scaleX();
505 double scaley = propMatrix->GetValue().
Get_scaleY();
506 tictextheightX = tictextheightX * scalex;
507 tictextheightY = tictextheightY * scaley;
518 internalTransform = propMatrix->GetValue();
522 double sizeticstroke = m_stroketic.
GetWidth();
523 double ticheight = GetTicHeight();
524 int hasLevels = HasLevelMarkers() ? 1 : 0;
528 double scalex = internalTransform.
Get_scaleX();
529 double scaley = internalTransform.
Get_scaleY();
532 length = length / scaley;
533 sizeticstroke = sizeticstroke / scaley;
538 length = length / scalex;
539 sizeticstroke = sizeticstroke / scalex;
546 wxString ticstr = m_commonTicFormat.IsEmpty() ?
548 : wxString::Format( m_commonTicFormat.c_str(), - wxMax( fabs(
m_min ), fabs(
m_max ) ) );
557 double transX = 0, transY = 0;
570 double ticsize = ticheight * ( 1.1 + hasLevels );
571 double textticpos = ticheight * ( 1.2 + hasLevels );
585 transX = 0, transY = length;
600 transX = length, transY = 0;
602 bboxtic.
Expand( bboxline );
603 bboxtic.
Expand( bboxtext );
605 if ( !m_units.IsEmpty() )
631 double ticsize = ticheight * ( 2 + hasLevels );
632 double textticpos = ticheight * ( 0.5 + hasLevels );
639 bboxtext.
Translate( textticpos, xy + sizeticstroke );
644 bboxtext.
Translate( -textticpos, xy + sizeticstroke );
646 transX = 0, transY = length;
647 if( !m_units.IsEmpty() )
656 bboxtext.
Translate( xy + sizeticstroke, textticpos );
661 bboxtext.
Translate( xy + sizeticstroke, -textticpos );
663 transX = length, transY = 0;
664 if( !m_units.IsEmpty() )
667 bboxtic.
Expand( bboxline );
668 bboxtic.
Expand( bboxtext );
670 if ( !m_units.IsEmpty() )
692 m_untransbboxtictext = bboxtext;
710 bbox.
MapBbox( internalTransform );
716 double a2dCurveAxis::ConvertWorld2Axis(
double RelativeWorldValue )
722 double a2dCurveAxis::ConvertAxis2World(
double AxisValue )
728 void a2dCurveAxis::AddLevel(
const wxString& levelName,
double val,
a2dCanvasObject*
object )
730 if ( !levelName.IsEmpty() )
738 a2dText* aText = aMarker->GetPrompt();
746 aMarker->SetPosition( val );
749 object->SetVisible(
false );
751 object->SetVisible(
true );
753 object->SetPosXY( 0, ConvertAxis2World( val ) );
755 object->SetPosXY( ConvertAxis2World( val ), 0 );
764 if ( ( *iter )->GetName() == levelName )
771 bool a2dCurveAxis::GetLevelValue(
const wxString& levelName,
double& val )
776 if ( ( *iter )->GetName() == levelName )
780 val = ConvertWorld2Axis( obj->
GetPosY() );
782 val = ConvertWorld2Axis( obj->
GetPosX() );
790 void a2dCurveAxis::SetInvertTic(
bool inverttic )
792 if( m_inverttic != inverttic )
795 m_inverttic = inverttic;
800 void a2dCurveAxis::MirrorLevels()
811 a2dText* aPrompt = aMarker->GetPrompt();
821 m_pTicFormatter = pFormatter;
822 m_pTicFormatter->
SetAxis(
this );
826 double a2dCurveAxis::GetTicStart()
const
829 double ticstart = floor(
m_min / tic + 0.5 ) * tic;
830 if ( ( tic > 0. && ticstart <=
m_min ) || ( tic < 0. && ticstart >=
m_min ) )
841 a2dCurveAxisLin::a2dCurveAxisLin(
double length,
bool yaxis )
842 : a2dCurveAxis( length, yaxis )
846 a2dCurveAxisLin::~a2dCurveAxisLin()
850 a2dCurveAxisLin::a2dCurveAxisLin(
const a2dCurveAxisLin& other, CloneOptions options,
a2dRefMap* refs )
851 : a2dCurveAxis( other, options, refs )
857 return new a2dCurveAxisLin( *
this, options, refs );
860 #if wxART2D_USE_CVGIO
864 if ( xmlparts == a2dXmlSer_attrib )
875 if ( xmlparts == a2dXmlSer_attrib )
882 #endif //wxART2D_USE_CVGIO
885 #define BBOX2XYWH(bbox) (bbox).GetMinX(), (bbox).GetMinY(), (bbox).GetWidth(), (bbox).GetHeight()
891 double tictextheight;
901 ticheight = GetTicHeight();
905 double sizeticstroke = m_stroketic.
GetWidth();
911 internalTransform = propMatrix->GetValue();
930 int hasLevels = HasLevelMarkers() ? 1 : 0;
936 double scalex = internalTransform.
Get_scaleX();
937 double scaley = internalTransform.
Get_scaleY();
940 length = length / scaley;
941 sizeticstroke = sizeticstroke / scaley;
945 length = length / scalex;
946 sizeticstroke = sizeticstroke / scalex;
955 ticstart = floor(
m_min / tic + 0.5 ) * tic;
956 if ( ( tic > 0 && ticstart <
m_min ) || ( tic < 0 && ticstart >
m_min ) )
963 double textticpos = ticheight * ( 1.2 + hasLevels );
964 double textmax =
m_max;
965 for ( x = ticstart; ( tic > 0 && x <= textmax ) || ( tic < 0 && x >= textmax ); x = x + tic )
973 double xy = ( x -
m_min ) / (
m_max - m_min ) * length;
975 wxString ticstr = m_pTicFormatter->
GetTicText( dTicValue );
992 if ( !m_units.IsEmpty() )
1014 double ticsize = ticheight * ( 1.1 + hasLevels );
1015 for ( x = ticstart; ( tic > 0 && x <= m_max ) || ( tic < 0 && x >=
m_max ); x = x + tic )
1017 double xy = ( x -
m_min ) / (
m_max - m_min ) * length;
1036 double textticpos = ticheight * ( 0.5 + hasLevels );
1037 double textmax =
m_max;
1038 double transformedTic = fabs( tic ) / fabs(
m_max - m_min ) * length;
1039 bool enDrawLastTic = transformedTic > ( 2 * tictextsize + 3 * sizeticstroke );
1041 for ( x = ticstart; ( tic > 0 && x <= textmax ) || ( tic < 0 && x >= textmax ); x = x + tic )
1049 double xy = ( x -
m_min ) / (
m_max - m_min ) * length;
1051 wxString ticstr = m_pTicFormatter->
GetTicText( dTicValue );
1053 bool notLastTic = fabs( xy - length ) > tictextsize;
1056 if ( m_units.IsEmpty() || notLastTic )
1063 else if( enDrawLastTic )
1073 if( m_units.IsEmpty() || notLastTic )
1080 else if( enDrawLastTic )
1089 if ( !m_units.IsEmpty() )
1095 ic.
GetDrawer2D()->
DrawText( m_units, textticpos, (
m_max > m_min ? length : 0 ) + sizeticstroke , wxMINY | wxMINX );
1097 ic.
GetDrawer2D()->
DrawText( m_units, -textticpos, (
m_max > m_min ? length : 0 ) + sizeticstroke , wxMINY | wxMAXX );
1102 ic.
GetDrawer2D()->
DrawText( m_units, (
m_max > m_min ? length : 0 ) - sizeticstroke, textticpos, (
m_max > m_min ? wxMINX : wxMAXX ) | wxMINY );
1104 ic.
GetDrawer2D()->
DrawText( m_units, (
m_max > m_min ? length : 0 ) - sizeticstroke, -textticpos, (
m_max > m_min ? wxMINX : wxMAXX ) | wxMAXY );
1111 double ticsize = ticheight * ( 2 + hasLevels );
1112 for ( x = ticstart; ( tic > 0 && x <= m_max ) || ( tic < 0 && x >=
m_max ); x = x + tic )
1114 double xy = ( x -
m_min ) / (
m_max - m_min ) * length;
1141 a2dCurveAxisArea::a2dCurveAxisArea()
1146 a2dCurveAxisArea::~a2dCurveAxisArea()
1150 a2dObject* a2dCurveAxisArea::Clone( CloneOptions options )
const
1152 return new a2dCurveAxisArea( *
this, options );
1155 a2dCurveAxisArea::a2dCurveAxisArea(
const a2dCurveAxisArea& other, CloneOptions options )
1160 a2dCurveAxis* a2dCurveAxisArea::GetAxis(
const wxString axisname )
1162 a2dCanvasObjectList::iterator iter = GetChildObjectList()->begin();
1163 while( iter != GetChildObjectList()->end() )
1165 if ( ( *iter )->GetName() == axisname )
1166 return ( a2dCurveAxis* ) ( *iter ).Get();
1172 a2dCurveAxis* a2dCurveAxisArea::GetAxis(
int nIndex )
1174 a2dCanvasObjectList::iterator iter = GetChildObjectList()->begin();
1176 while( ( i <= nIndex ) && ( iter != GetChildObjectList()->end() ) )
1179 return ( a2dCurveAxis* ) ( *iter ).Get();
1187 a2dCurveAxis* pAxis;
1213 if ( !m_bbox.GetValid() || calc )
1215 m_bbox = DoGetUnTransformedBbox();
1216 m_bbox.MapBbox( m_lworld );
1224 a2dBoundingBox a2dCurveAxisArea::DoGetUnTransformedBbox( a2dBboxFlags flags )
const
1226 a2dCurveAxis* pAxis;
1248 bool bShowBbox = TRUE;
1249 a2dCurveAxis* pAxis = NULL;
1272 void a2dCurveAxisArea::SetLength(
double length )
1274 a2dCurveAxis* pAxis;
1276 if ( m_length != length )
bool GetAttributeValueBool(const wxString &attrib, bool defaultv=false)
Returns the boolean value of an attribute.
wxPoint2DDouble a2dPoint2D
this to define if coordinate numbers are integer or doubles
double GetHeight() const
returns height of the boundingbox
(In) Visible property that can be added to Docview Objects.
double GetSize() const
Get the font size.
double m_max
maximum on axis (internal boundaries)
#define wxDynamicCast(obj, className)
Define wxDynamicCast so that it will give a compiler error for unrelated types.
Base class for all types of strokes, understood by a2dDrawer2D classes.
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
void SetFormatter(a2dTicFormatter *pFormatter)
Replace current tic formatter.
property to hold a a2dAffineMatrix
const a2dStroke * a2dBLACK_STROKE
global a2dStroke stock object for BLACK stroking
Font info class, used as a single element for enumerating fonts.
virtual void PopTransform(void)
Recall the previously saved user-to-world transform off the matrix stack.
XMLeventType Next()
Walks to next element and returns event type.
bool RequireAttributeValueBool(const wxString &attrib)
Forces an attribute and returns its boolean value.
void ParseString(wxString string)
Fill this class from a string.
bool ResolveOrAdd(a2dSmrtPtr< a2dObject > *storedHere, const wxString &id=wxT(""))
try to resolve the object that is in storedHere when it is a reference.
class to map references to objects stored in XML, in order to make the connection later on...
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
This is here so that this class cannot be used directly.
const a2dAffineMatrix & GetInverseTransform() const
Inverse of GetTransform()
void SetTicTextStroke(const a2dStroke &stroke)
Set a stroke for tics text.
proptype * GetPropertyListOnly(const a2dObject *obj) const
Get the property from the list in obj ( no members, not cloned )
a2dObject * Clone(CloneOptions options, a2dRefMap *refs=NULL) const
create an exact copy of this property
double m_ticmin
tic scale minimum on axis
double DeviceToWorldYRel(double y) const
convert y relative from device to world coordinates
wxString CreateString()
Create a string description of the font.
void SetDrawerStroke(const a2dStroke &stroke)
Used to set the current stroke.
bool IsIdentity(void) const
Is the matrix the identity matrix?
Defines a font to be set to a2dDrawer2D or stored in a2dCanvsObject etc.
Input and output handler for the XmlSer format.
virtual void SetPending(bool pending)
set this object pending for update
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
double GetTic() const
get distance of tic lines in X/Y (curve coords)
double m_length
length in parent world coordinates
a2dBoundingBox DoGetUnTransformedBbox(a2dBboxFlags flags=a2dCANOBJ_BBOX_NON) const
In derived object this should be overriden to calculate the boundingbox of the object without its chi...
double m_ticmax
tic scale maximum on axis
The base class for all drawable objects in a a2dCanvasDocument.
void SetTicBoundaries(double min, double max)
void SetFont(const a2dFont &font)
set font to use for drawing text
base class for axis in a2dCanvasXYDisplayGroup
virtual void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
a2dCanvasObject is the base class for Canvas Objects.
a2dCanvas * GetCanvas() const
Get the Display window of the a2dView. But casted to a a2dCanvas.
double m_position
position of axis
a2dCanvasObjectList * GetChildObjectList()
get the list where the child objects are stored in.
a2dCanvas uses a2dCanvasView for displaying a view on a a2dCanvasDocument.
virtual void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
double TransformDistance(double distance) const
Transform a distance.
a2dBoundingBox GetTextExtent(const wxString &string, int alignment=wxMINX|wxMINY, double *w=NULL, double *h=NULL, double *descent=NULL, double *externalLeading=NULL) const
Get the dimensions in world coordinates of the string.
virtual void SetName(const wxString &name)
Creates the a2dStringProperty PROPID_Name.
void WriteEndElement(bool newLine=true)
Writes correspondending end tag for the current start tag.
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
This is here so that this class cannot be used directly.
a2dCurveObject for objects needing to know its parent a2dCurvesArea.
void SetDrawerFill(const a2dFill &fill)
Used to set the current fill.
bool IsYAxis() const
return true is this axis is Yaxis
void WriteNewLine()
Writes a new line and takes care of indentation.
a2dText is an abstract base class.
a2dCanvasObjectList * wxNullCanvasObjectList
define a NON a2dCanvasObjectList
void Mirror(bool x=true, bool y=false)
Mirrors this object in x or y orientation.
bool GetValid() const
returns true if boundingbox is calculated properly and therefore its valid flag is set...
void Expand(const a2dPoint2D &, const a2dPoint2D &)
expand boundingbox width two points
const a2dBoundingBox & Translate(a2dPoint2D &)
translate with given vector
virtual void DrawRoundedRectangle(double x, double y, double width, double height, double radius, bool pixelsize=false)
Draw RoundedRectangle in world coordinates.
a2dCanvasObjectList * m_childobjects
holds child objects
#define forEachIn(listtype, list)
easy iteration for a2dlist
virtual void DoUpdateViewDependentObjects(a2dIterC &ic)
update derived objects
double GetPosX() const
get x position from affine matrix
base class for axis in a2dCanvasXYDisplayGroup
a2dDrawer2D * GetDrawer2D() const
get current a2dDrawer2D
#define wxStaticCast(obj, className)
The wxWindows 2.4.2 wxStaticCast is buggy. It evaluates its argument twice.
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
static a2dFont CreateFont(const a2dFontInfo &info, bool force=false)
Create the font from a fontinfo description.
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
void SetLength(double length)
set length in world coordinates ( not axis coordinates )
virtual void DrawLine(double x1, double y1, double x2, double y2)
Draw line in world coordinates.
Input and output handler for the XmlSer format.
void SetTicStroke(const a2dStroke &stroke)
Set a stroke for tics.
wxString RequireAttributeValue(const wxString &attrib)
Forces an attribute and returns its string value.
bool m_yaxis
is this an Y axis
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
virtual void DrawText(const wxString &text, double x, double y, int alignment=wxMINX|wxMINY, bool Background=true)
Draw text in user coordinates.
void SetVisible(bool visible)
set if this object will visible (be rendered or not)
bool m_showtics
if true tics are displayed
A 2x3 affine matrix class for 2D transformations.
static a2dPropertyIdMatrix * PROPID_IntViewDependTransform
used for objects with* PROPID_viewDependent but only for internal area
a2dPoint2D GetPosXY() const
get position of object
double GetAttributeValueDouble(const wxString &attrib, double defaultv=0)
Returns the double value of an attribute.
double GetLength() const
get length in world coordinates.
if set, set in the clone the PROPID_editcopy property to the original object
double GetPosY() const
get y position from affine matrix
while iterating a a2dCanvasDocument, this holds the context.
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
void MapBbox(const a2dAffineMatrix &matrix)
double Get_scaleX() const
return scaling in X
void SetStroke(const wxColour &strokecolor, double width=0, a2dStrokeStyle style=a2dSTROKE_SOLID)
Set a stroke for the object which will be used instead of the layer stroke.
virtual void Load(wxObject *parent, a2dIOHandlerXmlSerIn &parser)
load object from CVG file
wxString GetAttributeValue(const wxString &attrib, const wxString &defaultv=wxT(""))
Returns the value of an attribute.
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
void SetBoundaries(double min, double max)
define which part is displayed on this axis
editing tool for a2dCanvasObject's
double GetWidth() const
returns width of the boundingbox
An object of this class will update a a2dIterC with the required information.
void Require(const XMLeventType &type, wxString name)
Forces a special tag.
void SetPosXY(double x, double y, bool restrict=false)
set position to x,y
if set, clone members (e.g. line end styles), otherwise ref-copy them
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
void DoUpdateViewDependentObjects(a2dIterC &ic)
update derived objects
double m_min
minimum on axis (internal boundaries)
double Get_scaleY() const
return scaling in Y
#define const_forEachIn(listtype, list)
easy const iteration for a2dlist
the a2dDrawingPart is a a2dView specially designed for displaying parts of a a2dDrawing. It uses a a2dDrawer2D to actually redraw things from the document, by giving that a2dDrawer2D as drawing context to the document, and telling the document to redraw a certain rectangular area. At that last is what this class is for. It optimizes the areas to be redrawn after object in the document were changed. To do that it combines redraw areas to a minimal set of redrawing areas. All the administration for this and the way things will be redrawn is from this view.
virtual void Save(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dObjectList *towrite)
write all needed to an XML type of file called the CVG format
a2dDrawingPart * GetDrawingPart() const
get current a2dDrawingPart
double RequireAttributeValueDouble(const wxString &attrib)
Forces an attribute and returns its double value.
wxRect GetAbsoluteArea(a2dIterC &ic, int inflate=2)
Get absolute occupied area in the device coordinates.
void Append(a2dCanvasObject *obj)
append a a2dCanvasObject to the childobjects
a2dStrokeStyle
stroke styles for a2dStroke
A pointer class, that automatically calls SmrtPtrOwn/SmrtPtrRelease.
double DeviceToWorldXRel(double x) const
convert x relative from device to world coordinates
CloneOptions
options for cloning
a2dBoundingBox & GetBbox()
get boundingbox in world coordinates exclusive stroke width relative to its parent ...
virtual void PushIdentityTransform()
push no transform, to draw directly in device coordinates
const a2dFill * a2dTRANSPARENT_FILL
global a2dFill stock object for TRANSPARENT filling
void WriteStartElement(const wxString &name, bool newLine=true)
Writes start tag which has no attributes.
double GetTicTextHeight() const
return size of font