31 struct SortLayerOrder :
public std::binary_function< const a2dLayerInfoPtr&, const a2dLayerInfoPtr&, bool>
35 if ( x == wxNullLayerInfo && y == wxNullLayerInfo )
37 if ( x != wxNullLayerInfo && y == wxNullLayerInfo )
39 if ( x == wxNullLayerInfo && y != wxNullLayerInfo )
42 if ( x->GetOrder() < y->GetOrder() )
48 struct SortLayerReverseOrder :
public std::binary_function< const a2dLayerInfoPtr&, const a2dLayerInfoPtr&, bool>
52 if ( x == wxNullLayerInfo && y == wxNullLayerInfo )
54 if ( x != wxNullLayerInfo && y == wxNullLayerInfo )
56 if ( x == wxNullLayerInfo && y != wxNullLayerInfo )
59 if ( x->GetOrder() > y->GetOrder() )
65 struct SortLayerNr :
public std::binary_function< const a2dLayerInfoPtr&, const a2dLayerInfoPtr&, bool>
69 if ( x == wxNullLayerInfo && y == wxNullLayerInfo )
71 if ( x != wxNullLayerInfo && y == wxNullLayerInfo )
73 if ( x == wxNullLayerInfo && y != wxNullLayerInfo )
76 if ( x->GetLayer() < y->GetLayer() )
88 if ( firstc->
GetLayer() > secondc->GetLayer() )
98 if ( firstc->
GetOrder() < secondc->GetOrder() )
108 if ( firstc->
GetOrder() > secondc->GetOrder() )
143 BEGIN_EVENT_TABLE( a2dLayerInfo, a2dCanvasObject )
147 a2dLayerInfo::a2dLayerInfo()
150 m_layeravailable =
false;
151 m_layervisible =
true;
152 m_layerselectable =
true;
162 m_width = LAYERINFO_WIDTH;
163 m_height = LAYERINFO_HEIGHT;
167 m_type = wxT(
"SIGNAL" );
168 m_side = wxT(
"TOP" );
170 m_canvasObjectCount = 0;
171 m_canvasPreviousObjectCount = 0;
176 wxASSERT_MSG( GetHabitat()->GetMaxLayer() > index, wxT(
" wxLAYER_ALL layer is reserved do not use" ) );
204 m_canvasPreviousObjectCount = 0;
208 : a2dCanvasObject( other, options, refs )
236 m_canvasPreviousObjectCount = 0;
239 a2dLayerInfo::~a2dLayerInfo()
272 m_root->ProcessEvent( changedlayer );
276 #if wxART2D_USE_CVGIO
280 if ( xmlparts == a2dXmlSer_attrib )
285 out.WriteAttribute( wxT(
"readlayer" ),
m_readlayer );
286 out.WriteAttribute( wxT(
"inmap" ),
m_inmap );
287 out.WriteAttribute( wxT(
"outmap" ),
m_outmap );
288 out.WriteAttribute( wxT(
"order" ),
m_order );
289 if (
m_width != LAYERINFO_WIDTH )
292 out.WriteAttribute( wxT(
"width" ),
m_width );
297 out.WriteAttribute( wxT(
"height" ),
m_height );
301 out.WriteAttribute( wxT(
"feature" ),
m_feature );
302 out.WriteAttribute( wxT(
"subfeature" ),
m_subFeature );
303 out.WriteAttribute( wxT(
"type" ),
m_type );
304 out.WriteAttribute( wxT(
"polarity" ),
m_polarity );
305 out.WriteAttribute( wxT(
"span" ),
m_span );
306 out.WriteAttribute( wxT(
"area" ),
m_area );
316 if ( xmlparts == a2dXmlSer_attrib )
339 #endif //wxART2D_USE_CVGIO
427 double xmin = wxMin( 0 ,
m_width );
428 double ymin = wxMin( 0 ,
m_height );
429 double xmax = wxMax( 0 ,
m_width );
430 double ymax = wxMax( 0 ,
m_height );
442 m_root->ProcessEvent( changed );
456 const a2dSignal a2dLayers::sig_visibleAll = wxNewId();
457 const a2dSignal a2dLayers::sig_selectAll = wxNewId();
458 const a2dSignal a2dLayers::sig_outlineAll = wxNewId();
459 const a2dSignal a2dLayers::sig_readAll = wxNewId();
460 const a2dSignal a2dLayers::sig_availableAll = wxNewId();
462 INITIALIZE_PROPERTIES( a2dLayers, a2dCanvasObject )
519 a2dLayers::a2dLayers(): a2dCanvasObject()
525 a2dLayers::a2dLayers(
const a2dLayers& other, CloneOptions options,
a2dRefMap* refs )
526 : a2dCanvasObject( other, options, refs )
528 wxASSERT( ( options & clone_deep ) == clone_deep );
531 m_filename = other.m_filename;
536 a2dLayers::~a2dLayers()
542 return new a2dLayers( *
this, options, refs );
559 return m_layerArrayOnLayer;
566 return m_layerArrayOnOrder;
573 return m_layerArrayOnReverseOrder;
578 wxString foundfile = filename;
579 #if wxART2D_USE_CVGIO
584 #if wxUSE_STD_IOSTREAM
585 a2dDocumentFileInputStream stream( foundfile.mb_str() );
586 if ( stream.fail() || stream.bad() )
588 wxFileInputStream stream( foundfile );
597 if ( cvgparser.
CanLoad( stream,
this ) )
599 bool result = cvgparser.
LoadLayers( stream,
this );
609 wxFAIL_MSG( wxT(
"wxART2D_USE_CVGIO is needed to load layers from a CVG file" ) );
611 #endif //wxART2D_USE_CVGIO
617 #if wxUSE_STD_IOSTREAM
618 a2dDocumentFileOutputStream store( filename.mb_str() );
619 if ( store.fail() || store.bad() )
621 wxFileOutputStream storeUnbuf( filename );
622 wxBufferedOutputStream store( storeUnbuf );
623 if ( store.GetLastError() != wxSTREAM_NO_ERROR )
632 #if wxART2D_USE_CVGIO
635 bool res = handler->
SaveLayers( store,
this );
638 wxFAIL_MSG( wxT(
"wxART2D_USE_CVGIO is needed to save object to a CVG file" ) );
640 #endif //wxART2D_USE_CVGIO
644 void a2dLayers::InitWith(
int highlayer,
bool blackWhite )
648 if ( highlayer > GetHabitat()->GetMaxLayer() )
649 highlayer = GetHabitat()->GetMaxLayer();
652 for ( j = 0; j < highlayer; j++ )
655 namelay.Printf( wxT(
"Layer %d" ), j );
656 a2dLayerInfo* defLayer =
new a2dLayerInfo( j, namelay );
659 a2dFill fill =
a2dFill( wxColour( wxColour( rand() % 254, rand() % 254, rand() % 254 ) ) );
660 a2dStroke stroke =
a2dStroke( wxColour( wxColour( rand() % 254, rand() % 254, rand() % 254 ) ) );
666 int graycol = rand() % 254;
667 wxColour gray( graycol, graycol, graycol );
669 graycol = rand() % 254;
670 wxColour grays( graycol, graycol, graycol );
683 assert( indx >= 0 && indx < GetHabitat()->GetMaxLayer() );
return m_layerArrayOnLayer[indx];
687 assert( indx >= 0 && indx < GetHabitat()->GetMaxLayer() );
return m_layerArrayOnLayer[indx];
690 a2dLayerInfo* a2dLayers::GetLayerInfo(
int index )
692 assert( index >= 0 && index < GetHabitat()->GetMaxLayer() );
return m_layerArrayOnLayer[index];
697 if ( m_layerArrayOnOrder.size() != GetHabitat()->GetMaxLayer() )
699 m_layerArrayOnOrder.resize( GetHabitat()->GetMaxLayer() );
700 m_layerArrayOnReverseOrder.resize( GetHabitat()->GetMaxLayer() );
701 m_layerArrayOnLayer.resize( GetHabitat()->GetMaxLayer() );
711 for ( j = 0; j < GetHabitat()->GetMaxLayer(); j++ )
713 m_layerArrayOnOrder[j] = wxNullLayerInfo;
714 m_layerArrayOnReverseOrder[j] = wxNullLayerInfo;
715 m_layerArrayOnLayer[j] = wxNullLayerInfo;
720 wxUint16 maxorder = 0;
723 a2dLayerInfo* lobj = ( a2dLayerInfo* ) ( *iter ).Get();
724 wxUint16 layer = lobj->
m_layer;
726 maxorder = wxMax( lobj->
m_order, maxorder );
728 wxASSERT_MSG( layer < GetHabitat()->GetMaxLayer(), wxT(
"layer index must be > 0 and < GetHabitat()->GetMaxLayer()" ) );
730 if ( m_layerArrayOnLayer[ layer ] != wxNullLayerInfo )
733 warn.Printf( wxT(
"layer index %d defined twice" ), layer );
734 wxLogWarning( warn );
737 m_layerArrayOnLayer[ layer ] = lobj;
738 m_layerArrayOnOrder[ layer ] = lobj;
739 m_layerArrayOnReverseOrder[ layer ] = lobj;
745 for ( j = 0; j < GetHabitat()->GetMaxLayer(); j++ )
747 if ( m_layerArrayOnLayer[j] == wxNullLayerInfo )
750 namelay.Printf( wxT(
"Layer %d" ), j );
751 a2dLayerInfo* defLayer =
new a2dLayerInfo( j, namelay );
757 m_layerArrayOnLayer[j] = defLayer;
758 m_layerArrayOnOrder[j] = defLayer;
759 m_layerArrayOnReverseOrder[j] = defLayer;
763 std::sort( m_layerArrayOnLayer.begin(), m_layerArrayOnLayer.end(),
SortLayerNr() );
764 std::sort( m_layerArrayOnOrder.begin(), m_layerArrayOnOrder.end(),
SortLayerOrder() );
765 std::sort( m_layerArrayOnReverseOrder.begin(), m_layerArrayOnReverseOrder.end(),
SortLayerReverseOrder() );
803 SetAllLayersAvailable(
false );
808 set.SetSkipNotRenderedInDrawing(
true );
809 set.
Start( drawing );
812 void a2dLayers::SetAvailable( a2dLayers* other )
815 for ( j = 0; j < GetHabitat()->GetMaxLayer(); j++ )
817 m_layerArrayOnLayer[j]->SetAvailable( other->m_layerArrayOnLayer[j]->GetAvailable() );
835 #if wxART2D_USE_CVGIO
838 if ( xmlparts == a2dXmlSer_attrib )
846 a2dLayerInfo* lobj = ( a2dLayerInfo* ) ( *iter ).Get();
854 if ( xmlparts == a2dXmlSer_attrib )
865 if ( xmlparts == a2dXmlSer_attrib )
873 a2dLayerInfo* lobj =
wxDynamicCast( ( *iter ).Get(), a2dLayerInfo ) ;
877 wxLogWarning( wxT(
"%s %d" ), _T(
"Layer definition not in Range is removed: " ), lobj->
GetLayer() );
889 #endif //wxART2D_USE_CVGIO
893 return m_layerArrayOnLayer[layernumber]->GetName();
896 int a2dLayers::GetNumber( wxString name )
900 for ( j = 0; j < GetHabitat()->GetMaxLayer(); j++ )
902 if ( m_layerArrayOnLayer[j]->
GetName() == name )
905 wxFAIL_MSG( wxT(
"layer not defined in layerlist" ) );
909 a2dStroke a2dLayers::GetStroke(
int layernumber )
911 return m_layerArrayOnLayer[layernumber]->GetStroke();
916 return m_layerArrayOnLayer[layernumber]->GetVisible();
921 return m_layerArrayOnLayer[layernumber]->GetSelectable();
924 a2dFill a2dLayers::GetFill(
int layernumber )
926 return m_layerArrayOnLayer[layernumber]->GetFill();
929 int a2dLayers::GetOrder(
int layernumber )
931 return m_layerArrayOnLayer[layernumber]->GetOrder();
934 bool a2dLayers::GetRead(
int layernumber )
936 return m_layerArrayOnLayer[layernumber]->GetRead();
939 bool a2dLayers::GetPixelStroke(
int layernumber )
941 return m_layerArrayOnLayer[layernumber]->GetPixelStroke();
945 void a2dLayers::SetName(
int layernumber, wxString name )
947 m_layerArrayOnLayer[layernumber]->SetName( name );
950 void a2dLayers::SetVisible(
int layernumber,
bool status )
952 m_layerArrayOnLayer[layernumber]->SetVisible( status );
955 void a2dLayers::SetAvailable(
int layernumber,
bool status )
957 m_layerArrayOnLayer[layernumber]->SetAvailable( status );
960 void a2dLayers::SetSelectable(
int layernumber,
bool status )
962 m_layerArrayOnLayer[layernumber]->SetSelectable( status );
965 void a2dLayers::SetFill(
int layernumber,
const a2dFill& fill )
967 m_layerArrayOnLayer[layernumber]->SetFill( fill );
970 void a2dLayers::SetStroke(
int layernumber,
const a2dStroke& stroke )
972 m_layerArrayOnLayer[layernumber]->SetStroke( stroke );
977 a2dFill fill = m_layerArrayOnLayer[layernumber]->GetFill();
981 m_layerArrayOnLayer[layernumber]->SetFill( pfill );
984 void a2dLayers::SetOrder(
int layernumber,
int status )
986 m_layerArrayOnLayer[layernumber]->SetOrder( status );
989 void a2dLayers::SetRead(
int layernumber,
bool status )
991 m_layerArrayOnLayer[layernumber]->SetRead( status );
997 for ( j = 0; j < GetHabitat()->GetMaxLayer(); j++ )
999 m_layerArrayOnLayer[j]->SetVisible( onoff );
1004 m_root->ProcessEvent( changed );
1012 for ( j = 0; j < GetHabitat()->GetMaxLayer(); j++ )
1014 m_layerArrayOnLayer[j]->SetRead( onoff );
1019 m_root->ProcessEvent( changed );
1027 for ( j = 0; j < GetHabitat()->GetMaxLayer(); j++ )
1029 m_layerArrayOnLayer[j]->SetSelectable( onoff );
1034 m_root->ProcessEvent( changed );
1042 for ( j = 0; j < GetHabitat()->GetMaxLayer(); j++ )
1044 a2dFill fill = m_layerArrayOnLayer[j]->GetFill();
1046 m_layerArrayOnLayer[j]->SetFill( fill );
1051 m_root->ProcessEvent( changed );
1055 void a2dLayers::SetAllLayersAvailable(
bool onoff )
1059 for ( j = 0; j < GetHabitat()->GetMaxLayer(); j++ )
1061 m_layerArrayOnLayer[j]->SetAvailable( onoff );
1066 m_root->ProcessEvent( changed );
1070 int a2dLayers::GetInMapping(
int layernumber )
1072 return m_layerArrayOnLayer[layernumber]->GetInMapping();
1075 int a2dLayers::GetOutMapping(
int layernumber )
1077 return m_layerArrayOnLayer[layernumber]->GetOutMapping();
1080 void a2dLayers::SetInMapping(
int layernumber, wxUint16 layer )
1082 m_layerArrayOnLayer[layernumber]->SetInMapping( layer );
1085 void a2dLayers::SetOutMapping(
int layernumber, wxUint16 layer )
1087 m_layerArrayOnLayer[layernumber]->SetOutMapping( layer );
1090 void a2dLayers::SetPixelStroke(
int layernumber,
bool status )
1092 m_layerArrayOnLayer[layernumber]->SetPixelStroke( status );
a2dHit m_how
return in which way the object was hit (stroke, fill, ...)
bool GetAttributeValueBool(const wxString &attrib, bool defaultv=false)
Returns the boolean value of an attribute.
double m_relx
(world coordinates) hit point x relative to the canvas object its parent object(s) ...
#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.
a2dCanvasObjectList * CreateChildObjectList()
create and get the list where the child objects are stored in.
wxString m_layername
name of the layer
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
virtual void SetParent(a2dCanvasObject *parent)
set parent object of the pin or some other objects that needs a parent
void SetSelectable(bool status)
set layer selectable
a2dLayerInfo * operator[](int indx)
element operator
void SetAll_Layers_Selectable(bool onoff)
set all visible layers selectable
virtual wxString GetName() const
Returns the name of this object, if no name is given the internal id will be returned.
class to map references to objects stored in XML, in order to make the connection later on...
wxColour GetColour2() const
return colour 2
a2dDrawing * m_root
root group for rendering and accessing the canvas's also contains layer settings
a2dCanvasOFlags m_flags
holds flags for objects
bool GetAvailable()
are there objects on this layer
void SignalChange()
sent a sig_changedLayerInfo to a2dDrawing
bool m_readlayer
will the layer be read from a file
void SetAll_Layers_Outline(bool onoff)
set all visible layers outline
void SetPixelStroke(bool pixelstroke)
set pixelstoke flag, stroke width is defined in pixels else in worldcoordinates
wxUint16 m_outmap
mapping to this layer from the file layer in the output file
void SetPixelStroke(bool pixel)
make stroke of layer a pixelstroke
void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
bool m_pending
set when a2dCanvasObject needs an update (redraw).
double m_height
height of rectangle
bool IsHit() const
true if this is a hit
a2dPinClass * m_pinclass
The class defines to which other pins a pin on this layer can connect.
virtual void SetName(const wxString &name)
Set name for layer.
const a2dError a2dError_FileCouldNotOpen
Input and output handler for the XmlSer format.
UpdateMode
Various mode flags for Update.
bool GetPixelStroke() const
if the width is pixels or not.
virtual void SetPending(bool pending)
set this object pending for update
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
bool m_polarity
negative or positive
wxString m_subFeature
extra as part of a feature.
The base class for all drawable objects in a a2dCanvasDocument.
double GetTransformedHitMargin()
transformed to object its coordinate system
#define A2D_PROPID_M_F(type, classname, propname, defaultval, mptr, flags)
to define a get set property more easily
wxUint16 m_layer
layer of object, default wxLAYER_DEFAULT
virtual void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
a2dCanvasObject is the base class for Canvas Objects.
std::vector< a2dLayerInfoPtr > & GetLayerIndex()
return array index on Layer
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
wxString m_span
Used to tell for layers of type hole, in between which other two layers this hole starts and ends...
output handler for the CVG format.
bool SaveLayers(const wxString &filename)
save layer object to CVG file
bool GetVisible()
is the layer visible
int GetOutMapping()
mapping of internal layer index to external layer index
bool m_layervisible
is the layer visible
void OnPropertyChanged(a2dComEvent &event)
virtual bool CanLoad(a2dDocumentInputStream &stream, const wxObject *obj=NULL, wxClassInfo *docClassInfo=NULL)
test header of the file to see if its CVG format
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
void SetPattern(int layernumber, const wxBitmap &stipple)
sets a a2dPatternFill to this stipple, if not a a2dPatternFill, it will be changed.
void WriteNewLine()
Writes a new line and takes care of indentation.
bool m_layerselectable
is the layer selectable
void SetVisible(bool status)
set layer visible
double m_area
used to save area occupied by all primitives on the layer
wxUint32 m_canvasObjectCount
void SetRead(bool status)
read this layer from input files
a2dCanvasObjectList * wxNullCanvasObjectList
define a NON a2dCanvasObjectList
bool Start(a2dObject *object)
object to start the algorithm
bool GetSelectable()
can objects on this layer be selected
virtual wxString GetName() const
Get name for layer.
void Expand(const a2dPoint2D &, const a2dPoint2D &)
expand boundingbox width two points
void SetPending(bool pending)
setpending to also set a2dLayers pending
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
int GetInMapping()
mapping of external file layer to internal layer index
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
void SetPropertyToObject(a2dObject *obj, const basetype &value, SetFlags setflags=set_none) const
Set the property in obj to value.
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...
wxString m_feature
this layer is part of a group of layers to present a feature ( metalized via etc. )...
#define EVT_COM_EVENT(func)
static wxEvtHandler for communication event
layer settings for a a2dCanvasDocument Holds layers settings classes
a2dDrawer2D * GetDrawer2D() const
get current a2dDrawer2D
#define wxStaticCast(obj, className)
The wxWindows 2.4.2 wxStaticCast is buggy. It evaluates its argument twice.
static a2dPropertyIdBool * PROPID_TemporaryObject
set for objects that do not have to be saved
void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
void SetPending(bool pending)
next to base sets m_indexed false
static const a2dSignal sig_changedLayerInfo
when one layer its a2dLayerInfo has changed ( e.g. visible or order of rendering ) ...
bool SaveLayers(a2dDocumentOutputStream &stream, a2dLayers *layers)
save a layer definition to a CVG file.
A2DGENERALDLLEXP a2dSmrtPtr< a2dGeneralGlobal > a2dGeneralGlobals
a global pointer to get to global instance of important classes.
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
wxString m_side
which side of board
wxUint16 GetLayer() const
Returns the layer index where this object is drawn upon.
bool GetPixelStroke()
stroke defined in pixels?
void SetColour(const wxColour &col)
set colour used for gradient and wxSTIPPLE_MASK_OPAQUE filling.
contains the layer properties for one layer,
Input and output handler for the XmlSer format.
void SetInMapping(wxUint16 layer)
read this layer from the given layer in input files
void UpdateIndexes()
all non defined layers until wxMAXLAYER will be added a new childs.
void SetAll_Layers_Read(bool onoff)
set all layers read
bool LoadLayers(a2dDocumentInputStream &stream, a2dLayers *layers)
load a layer definition from a CVG file.
wxString m_description
what is this layer for.
void SetAll_Layers_Visible(bool onoff)
set all layers visible
bool m_indexed
to test if index array are valid
bool LoadLayers(const wxString &filename)
save layers to a file
void MakeUnique()
all with reference count > 1 are cloned.
double GetAttributeValueDouble(const wxString &attrib, double defaultv=0)
Returns the double value of an attribute.
wxUint16 GetAttributeValueUint16(const wxString &attrib, wxUint16 defaultv=0)
cast to wxUint16 of GetAttributeValueInt()
while iterating a a2dCanvasDocument, this holds the context.
a2dWalker based algorithms
set layers available in a2dCanvasView as found in document
bool ReleaseChildObjects(a2dCanvasObjectFlagsMask mask=a2dCanvasOFlags::ALL)
removes and release only from the childobjects the objects with the given mask
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.
void SetOutMapping(wxUint16 layer)
write this layer from the given layer to output files
std::vector< a2dLayerInfoPtr > & GetReverseOrderIndex()
return array index on ReverseOrder
wxString GetAttributeValue(const wxString &attrib, const wxString &defaultv=wxT(""))
Returns the value of an attribute.
void OnPropertyChanged(a2dComEvent &event)
called via a2dPropertyId SetPropertyToObject() etc.
void SetOrder(wxUint16 order)
set drawing order for layer
wxUint16 m_order
drawing order number
const a2dError a2dError_LoadLayers
bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
static a2dPinClass * Standard
Pins of this class can only connect to pins of the same class.
wxColour GetColour() const
return colour
double m_width
width of rectangle
bool GetVisible() const
get visibility (rendering depends on layer settings also)
bool GetSelectable() const
is the object selectable flag set
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
std::vector< a2dLayerInfoPtr > & GetOrderIndex()
return array index on Order
void SetFilling(bool OnOff)
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.
Input handler for the CVG format.
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
This template class is for property ids with a known data type.
wxUint16 m_inmap
mapping to this layer from the file layer in the input file
If a property with this id has changed its parent/holder will be notified.
void Append(a2dCanvasObject *obj)
append a a2dCanvasObject to the childobjects
double m_rely
(world coordinates) hit point y relative to the canvas object its parent object(s) ...
A pointer class, that automatically calls SmrtPtrOwn/SmrtPtrRelease.
void SetColour2(const wxColour &col)
set colour 2 used for gradient and wxSTIPPLE_MASK_OPAQUE filling.
CloneOptions
options for cloning
wxString m_type
type of layer (mask, holes etc.)
a2dLayerInfo()
constructor
basic 2 point line class for intersection and contouring routines.
structure to give as parameter to member functions of a2dCanvasObject
Contain one drawing as hierarchical tree of a2dCanvasObject's.
void SetFill(const a2dFill &fill)
Set a fill for the object which will be used instead of the layer fill.
general canvas module declarations and classes
bool GetRead()
does this layer need to be read in from a file.