wxArt2D
recur.cpp
Go to the documentation of this file.
1 /*! \file canvas/src/recur.cpp
2  \author Klaas Holwerda
3 
4  Copyright: 2001-2004 (c) Klaas Holwerda
5 
6  Licence: wxWidgets Licence
7 
8  RCS-ID: $Id: recur.cpp,v 1.107 2009/09/26 20:40:32 titato Exp $
9 */
10 
11 #include "a2dprec.h"
12 
13 #ifdef __BORLANDC__
14 #pragma hdrstop
15 #endif
16 
17 #ifndef WX_PRECOMP
18 #include "wx/wx.h"
19 #endif
20 
21 #include "wx/canvas/recur.h"
22 #include "wx/canvas/objlist.h"
23 #include "wx/canvas/canglob.h"
24 #include "wx/canvas/drawer.h"
25 
26 #include <wx/wfstream.h>
27 #include <math.h>
28 
29 //----------------------------------------------------------------------------
30 // globals
31 //----------------------------------------------------------------------------
32 IMPLEMENT_DYNAMIC_CLASS( a2dCanvasObjectReference, a2dCanvasObject )
34 IMPLEMENT_DYNAMIC_CLASS( a2dLibraryReference, a2dText )
35 IMPLEMENT_DYNAMIC_CLASS( a2dNameReference, a2dText )
36 IMPLEMENT_DYNAMIC_CLASS( a2dExternalReference, a2dText )
37 IMPLEMENT_DYNAMIC_CLASS( a2dSymbolicReference, a2dCanvasObject )
38 
39 //----------------------------------------------------------------------------
40 //----------------------------------------------------------------------------
41 // a2dCanvasObjectReference
42 //----------------------------------------------------------------------------
43 
44 const a2dPropertyIdCanvasObject a2dCanvasObjectReference::PROPID_refobject( wxT( "refobject" ), a2dPropertyId::flag_transfer | a2dPropertyId::flag_onlymemberhint, 0 );
45 
47  : a2dCanvasObject()
48 {
49  m_object = 0;
50  m_flags.m_ignoreLayer = true;
51 }
52 
53 a2dCanvasObjectReference::a2dCanvasObjectReference( double x, double y, a2dCanvasObject* obj )
54  : a2dCanvasObject()
55 {
56  m_lworld.Translate( x, y );
57  m_object = obj;
58  m_flags.m_ignoreLayer = true;
59 }
60 
61 a2dCanvasObjectReference::~a2dCanvasObjectReference()
62 {
63 }
64 
66 {
67  return new a2dCanvasObjectReference( *this, options, refs );
68 };
69 
70 a2dCanvasObjectReference::a2dCanvasObjectReference( const a2dCanvasObjectReference& other, CloneOptions options, a2dRefMap* refs )
71  : a2dCanvasObject( other, options, refs )
72 {
73  // If needed, understand that if reference has wires connected to it, clone brothers go wrong (not reset).
74  // Maybe also use clone_noReference.
75  //if ( options & clone_members && other.m_object )
76  // m_object = other.m_object->TClone( CloneOptions( options & ~ clone_seteditcopy ) );
77  //else
78  m_object = other.m_object;
79 }
80 
82 {
83  if ( m_object )
84  m_object->AddPending( ic );
85 }
86 
88 {
89  if( !other )
90  return false;
91 
92 #if defined(_DEBUG)
93  wxString name = other->GetName();
94 #endif
95 
96  if ( m_object.Get() )
97  return false;
98 
99  m_object = wxStaticCast( other, a2dCanvasObject );
100  m_object->SetCheck( true );
101  return true;
102 }
103 
105 {
106  return m_object;
107 }
108 
110 {
111  m_object = object;
112 }
113 
115 {
116  if ( m_object && m_object->GetOwnedBy() > 1 )
117  {
118  m_object = wxStaticCast( m_object->Clone( a2dObject::clone_flat ), a2dCanvasObject );
119  }
121 }
122 
124 {
125  if ( m_object )
126  return m_object;
127  return this;
128 }
129 
130 void a2dCanvasObjectReference::DoWalker( wxObject* parent, a2dWalkerIOHandler& handler )
131 {
132  if ( m_object.Get() )
133  m_object->Walker( this, handler );
134 
135  a2dCanvasObject::DoWalker( parent, handler );
136 }
137 
139 {
140  a2dBoundingBox bbox;
141  if ( m_object )
142  bbox.Expand( m_object->GetBbox() );
143  else
144  bbox.Expand( 0, 0 );
145  return bbox;
146 }
147 
148 bool a2dCanvasObjectReference::DoUpdate( UpdateMode mode, const a2dBoundingBox& childbox, const a2dBoundingBox& clipbox, const a2dBoundingBox& propbox )
149 {
150  bool calc = false;
151  if ( m_object )
152  {
153  calc = m_object->Update( mode );
154  }
155 
156  if ( !m_bbox.GetValid() || calc )
157  {
160  return true;
161  }
162  return false;
163 }
164 
166 {
167  if ( !m_object )
168  {
169  double x1;
170  double y1;
171  ic.GetTransform().TransformPoint( 0, 0, x1, y1 );
172  int dx = ic.GetDrawer2D()->WorldToDeviceX( x1 );
173  int dy = ic.GetDrawer2D()->WorldToDeviceY( y1 );
174 
176  ic.GetDrawer2D()->DrawLine( dx - 3, dy, dx + 4, dy );
177  ic.GetDrawer2D()->DrawLine( dx, dy + 3, dx, dy - 4 );
178  ic.GetDrawer2D()->PopTransform();
179  return;
180  }
181 
182  if ( !ic.GetRenderChildDerived() )
183  return;
184 
185  OVERLAP childclip = _IN;
186  if ( clipparent != _IN )
187  childclip = m_object->GetClipStatus( ic, clipparent );
188 
189  if ( childclip != _OUT ) //if a child is _OUT, no need to render it.
190  {
191  // Translate2D over XY from the structurereference
192  m_object->Render( ic, childclip );
193  }
194 }
195 
196 void a2dCanvasObjectReference::DoWalkerWithContext( a2dIterC& ic, wxObject* parent, a2dWalkerIOHandlerWithContext& handler )
197 {
198  if ( !m_object )
199  return;
200 
201  a2dCanvasObject::DoWalkerWithContext( ic, parent, handler );
202 
203  m_object->WalkerWithContext( ic, this, handler );
204 }
205 
206 #if wxART2D_USE_CVGIO
207 void a2dCanvasObjectReference::DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite )
208 {
209  a2dCanvasObject::DoSave( parent, out, xmlparts, towrite );
210  if ( xmlparts == a2dXmlSer_attrib )
211  {
212  if ( m_object )
213  out.WriteAttribute( wxT( "object" ), m_object->GetUniqueSerializationId() );
214  }
215  else
216  {
217  //if object is not saved yet, we need to save it here.
218  if ( m_object && !m_object->GetCheck() )
219  {
220  //trick the system to have multiple refs on those objects, else we will not get an id attribute
221  a2dCanvasObjectPtr multiRef = m_object;
222 
223  out.WriteStartElement( wxT( "derived" ) );
224  m_object->Save( this, out, towrite );
225  out.WriteEndElement();
226  }
227  }
228 }
229 
230 void a2dCanvasObjectReference::DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts )
231 {
232  a2dCanvasObject::DoLoad( parent, parser, xmlparts );
233  if ( xmlparts == a2dXmlSer_attrib )
234  {
235  if ( parser.HasAttribute( wxT( "object" ) ) )
236  {
237  parser.ResolveOrAdd( ( a2dSmrtPtr<class a2dObject>* ) &m_object, parser.GetAttributeValue( wxT( "object" ) ) );
238  }
239  }
240  else
241  {
242  if ( parser.GetTagName() != wxT( "derived" ) )
243  return;
244 
245  parser.Require( START_TAG, wxT( "derived" ) );
246  parser.Next();
247 
248  m_object = (a2dCanvasObject*) parser.LoadOneObject( this );
249 
250  parser.Require( END_TAG, wxT( "derived" ) );
251  parser.Next();
252  }
253 }
254 #endif //wxART2D_USE_CVGIO
255 
257 {
258  if ( !m_object )
259  return false;
260  return m_object->IsHitWorld( ic, hitEvent ) != 0;
261 }
262 
264 {
265  if ( m_object && !m_object->GetRelease() )
266  {
267  CreateChildObjectList()->push_front( m_object );
268  }
269 
270  m_object = NULL;
271 
273 }
274 
275 //----------------------------------------------------------------------------
276 // a2dCanvasObjectArrayReference
277 //----------------------------------------------------------------------------
278 
279 a2dCanvasObjectArrayReference::a2dCanvasObjectArrayReference()
281 {
282 }
283 
284 a2dCanvasObjectArrayReference::a2dCanvasObjectArrayReference( double x, double y, int rows, int columns, double horzSpace, double vertSpace, a2dCanvasObject* obj )
285  : a2dCanvasObjectReference( x, y, obj )
286 {
287  m_horzSpace = horzSpace;
288  m_vertSpace = vertSpace;
289  m_rows = rows;
290  m_columns = columns;
291 }
292 
293 a2dCanvasObjectArrayReference::~a2dCanvasObjectArrayReference()
294 {
295 }
296 
298 {
299  return new a2dCanvasObjectArrayReference( *this, options, refs );
300 };
301 
302 a2dCanvasObjectArrayReference::a2dCanvasObjectArrayReference( const a2dCanvasObjectArrayReference& other, CloneOptions options, a2dRefMap* refs )
303  : a2dCanvasObjectReference( other, options, refs )
304 {
305  m_horzSpace = other.m_horzSpace;
306  m_vertSpace = other.m_vertSpace;
307  m_rows = other.m_rows;
308  m_columns = other.m_columns;
309 }
310 
312 {
313  a2dBoundingBox tmp;
314 
315  if ( m_object )
316  tmp = m_object->GetBbox();
317  else
318  tmp.Expand ( 0, 0 );
319 
320  a2dBoundingBox bbox;
321  bbox.Expand( tmp );
322 
323  tmp.Translate( ( m_columns - 1 )*m_horzSpace, 0 );
324  bbox.Expand( tmp );
325 
326  tmp.Translate( 0, ( m_rows - 1 )*m_vertSpace );
327  bbox.Expand( tmp );
328 
329  tmp.Translate( -( m_columns - 1 )*m_horzSpace, 0 );
330  bbox.Expand( tmp );
331  return bbox;
332 }
333 
334 bool a2dCanvasObjectArrayReference::DoUpdate( UpdateMode mode, const a2dBoundingBox& childbox, const a2dBoundingBox& clipbox, const a2dBoundingBox& propbox )
335 {
336  if ( !m_bbox.GetValid() )
337  {
340  return true;
341  }
342  return false;
343 }
344 
346 {
347  if ( !m_object )
348  return;
349 
350  a2dAffineMatrix offsetXY;
351 
352  int i, j;
353  for ( i = 0 ; i < m_rows; i++ )
354  {
355  for ( j = 0 ; j < m_columns; j++ )
356  {
357  a2dIterCU cu( ic, offsetXY );
358 
359  OVERLAP childclip = _IN;
360  if ( clipparent != _IN )
361  childclip = m_object->GetClipStatus( ic, clipparent );
362 
363  if ( childclip != _OUT ) //if a child is _OUT, no need to render it.
364  {
365  // Translate2D over XY from the structurereference
366  m_object->Render( ic, childclip );
367  }
368 
369  offsetXY.Translate( m_horzSpace, 0 );
370  }
371  //translate back (one row of columns) and add one row
372  offsetXY.Translate( -m_horzSpace * m_columns, m_vertSpace );
373  }
374 }
375 
376 #if wxART2D_USE_CVGIO
377 void a2dCanvasObjectArrayReference::DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite )
378 {
379  a2dCanvasObjectReference::DoSave( parent, out, xmlparts, towrite );
380  if ( xmlparts == a2dXmlSer_attrib )
381  {
382  out.WriteAttribute( wxT( "columns" ), m_columns );
383  out.WriteAttribute( wxT( "rows" ), m_rows );
384  out.WriteAttribute( wxT( "horzspace" ), m_horzSpace );
385  out.WriteAttribute( wxT( "vertspace" ), m_vertSpace );
386  out.WriteNewLine();
387  }
388  else
389  {
390  }
391 }
392 
393 void a2dCanvasObjectArrayReference::DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts )
394 {
395  a2dCanvasObjectReference::DoLoad( parent, parser, xmlparts );
396  if ( xmlparts == a2dXmlSer_attrib )
397  {
398  m_columns = parser.RequireAttributeValueInt( wxT( "columns" ) );
399  m_rows = parser.RequireAttributeValueInt( wxT( "rows" ) );
400  m_horzSpace = parser.RequireAttributeValueDouble( wxT( "horzspace" ) );
401  m_vertSpace = parser.RequireAttributeValueDouble( wxT( "vertspace" ) );
402  }
403  else
404  {
405  }
406 }
407 #endif //wxART2D_USE_CVGIO
408 
410 {
411  if ( !m_object )
412  return false;
413 
414  double pw = ic.GetTransformedHitMargin();
415  double margin = ic.GetTransformedHitMargin();
416 
418 
419  double xmin = tmp.GetMinX();
420  double ymin = tmp.GetMinY();
421  double xmax = tmp.GetMaxX();
422  double ymax = tmp.GetMaxY();
423 
424  hitEvent.m_how = HitTestRectangle( hitEvent.m_relx, hitEvent.m_rely, xmin, ymin, xmax, ymax, pw + margin );
425  return hitEvent.m_how.IsHit();
426 }
427 
429 {
430  if ( m_object && !m_object->GetRelease() )
431  {
432  a2dCanvasObjectPtr cobj;
433 
434  a2dAffineMatrix currentWorld = a2dIDENTITY_MATRIX;
435  a2dAffineMatrix offsetXY;
436 
437  int i, j;
438  for ( i = 0 ; i < GetRows(); i++ )
439  {
440  for ( j = 0 ; j < GetColumns(); j++ )
441  {
442  a2dAffineMatrix tworld = offsetXY;
443  tworld *= m_lworld;
444 
445  cobj = ( a2dCanvasObject* ) m_object->Clone( clone_deep );
446  //cobj->Transform( offsetXY );
447  //cobj->Transform( m_lworld );
448  cobj->SetTransformMatrix( tworld );
449  cobj->SetRelease( false );
450  cobj->SetPending( true );
451 
452  CreateChildObjectList()->push_back( cobj );
453 
454  offsetXY.Translate( GetHorzSpace(), 0 );
455  }
456  //translate back (one row of columns) and add one row
457  offsetXY.Translate( -GetHorzSpace()*GetColumns(), GetVertSpace() );
458  }
459  m_object = NULL;
460  }
461 
463 }
464 
465 
466 //----------------------------------------------------------------------------
467 // a2dLibraryReference
468 //----------------------------------------------------------------------------
469 
470 a2dLibraryReference::a2dLibraryReference()
471  : a2dImage()
472 {
473  m_layer = GetHabitat()->GetSymbolLayer();
474  SetName( wxT( "libraryref" ) );
475  m_symbol = 0;
476 
477  m_height = 100;
478  m_width = 0;
479 
480  m_text = new a2dText( wxT( "libraryref" ), -m_height / 2 , -m_height / 2 - m_height / 5, a2dFont( m_height / 5, wxSWISS ) );
481 
482  m_object = 0;
483 }
484 
485 
486 a2dLibraryReference::a2dLibraryReference( double x, double y, a2dCanvasObject* obj, const wxString& name,
487  double totalheight, a2dCanvasObject* symbol,
488  const a2dFont& font, int imagew, int imageh )
489 
490  : a2dImage( wxImage( imagew, imageh ), x, y, totalheight, totalheight )
491 {
492  m_object = obj;
493  m_symbol = symbol;
494 
495  m_layer = GetHabitat()->GetSymbolLayer();
496 
497  RenderObject( symbol ? symbol : obj, imagew, imageh );
498 
499  SetName( name );
500 
501  if ( !name.IsEmpty() )
502  {
503  a2dFont lfont = font;
504  lfont.SetSize( totalheight / 5.0 );
505  m_text = new a2dText( name, -totalheight / 2, -totalheight / 2 - totalheight / 5, lfont );
506  m_text->SetStroke( *a2dBLACK_STROKE );
507  m_text->SetFill( *a2dTRANSPARENT_FILL );
508  m_text->SetLayer( GetHabitat()->GetSymbolLayer() );
509  }
510  else
511  {
512  m_text = 0;
513  }
514 
515  m_flags.m_visiblechilds = false;
516 
517  m_height = totalheight;
518  m_width = totalheight;
519 
521 }
522 
523 a2dLibraryReference::a2dLibraryReference( const a2dLibraryReference& other, CloneOptions options, a2dRefMap* refs )
524  : a2dImage( other, options, refs )
525 {
526  m_object = other.m_object;
527 
528  m_height = other.m_height;
529  m_width = other.m_width;
530  m_description = other.m_description;
531  m_text = ( a2dText* )other.m_text->Clone( clone_deep );
532  m_symbol = other.m_symbol;
533 #if defined(_DEBUG) && defined (SMART_POINTER_DEBUG)
534  //it is because the CurrentSmartPointerOwner can change in property->TClone()
535  CurrentSmartPointerOwner = this;
536 #endif
537 }
538 
539 a2dLibraryReference::~a2dLibraryReference()
540 {
541 }
542 
543 void a2dLibraryReference::DoWalker( wxObject* parent, a2dWalkerIOHandler& handler )
544 {
545  a2dCanvasObject::DoWalker( parent, handler );
546  if ( m_symbol )
547  m_symbol->Walker( this, handler );
548 
549  if ( m_text )
550  m_text->Walker( this, handler );
551 }
552 
554 {
555  return m_object;
556 }
557 
559 {
560  m_object = object;
561 }
562 
563 
565 {
566  SetPending( true );
567  m_symbol = symbol;
568  if ( m_symbol && m_root )
569  m_symbol->SetRoot( m_root );
570 
571  RenderObject( m_symbol ? m_symbol.Get() : GetCanvasObject() );
572 
573 }
574 
576 {
577  return m_symbol;
578 }
579 
581 {
582  return new a2dLibraryReference( *this, options, refs );
583 }
584 
586 {
588 
589  bbox.Expand( m_text->GetUnTransformedBbox() );
590  return bbox;
591 }
592 
593 bool a2dLibraryReference::DoUpdate( UpdateMode mode, const a2dBoundingBox& childbox, const a2dBoundingBox& clipbox, const a2dBoundingBox& propbox )
594 {
595  if ( !m_bbox.GetValid() )
596  {
597  RenderObject( m_symbol ? m_symbol : m_object, ( int ) m_width, ( int ) m_height );
598 
599  a2dImage::DoUpdate( mode, childbox, clipbox, propbox );
600  if ( m_text )
601  {
602  a2dBoundingBox tbbox;
603  m_text->Update( mode );
604  tbbox.Expand( m_text->GetBbox() );
605  tbbox.MapBbox( m_lworld );
606  m_bbox.Expand( tbbox );
607  }
608 
609  m_width = m_bbox.GetWidth();
610 
611  return true;
612  }
613  return false;
614 }
615 
617 {
618  a2dImage::DoRender( ic, clipparent );
619  if ( m_text )
620  m_text->Render( ic, clipparent );
621 }
622 
623 #if wxART2D_USE_CVGIO
624 void a2dLibraryReference::DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite )
625 {
626  a2dImage::DoSave( parent, out, xmlparts, towrite );
627 }
628 
629 void a2dLibraryReference::DoLoad( wxObject* WXUNUSED( parent ), a2dIOHandlerXmlSerIn& WXUNUSED( parser ), a2dXmlSer_flag WXUNUSED( xmlparts ) )
630 {
631 }
632 #endif //wxART2D_USE_CVGIO
633 
635 {
636  if ( m_text && m_text->IsHitWorld( ic, hitEvent ) )
637  return true;
638 
639  return a2dImage::DoIsHitWorld( ic, hitEvent );
640 }
641 
642 
643 //----------------------------------------------------------------------------
644 // a2dExternalReference
645 //----------------------------------------------------------------------------
646 a2dExternalReference::a2dExternalReference()
647  : a2dText( wxT( "" ) , 0, 0 )
648 {
649  m_text = wxT( "nameref" );
650  m_object = 0;
651 }
652 
653 a2dExternalReference::a2dExternalReference( double x, double y, a2dCanvasObject* obj, const wxString& text, double angle, const a2dFont& font )
654  : a2dText( text, x, y, font, angle )
655 {
656  if ( m_text.IsEmpty() && obj )
657  m_text = obj->GetName();
658  else
659  m_text = text;
660 
661  m_object = obj;
662 }
663 
664 a2dExternalReference::a2dExternalReference( const a2dExternalReference& other, CloneOptions options, a2dRefMap* refs )
665  : a2dText( other, options, refs )
666 {
667  m_object = other.m_object;
668 }
669 
670 a2dExternalReference::~a2dExternalReference()
671 {
672 }
673 
674 void a2dExternalReference::DoWalker( wxObject* parent, a2dWalkerIOHandler& handler )
675 {
676  a2dCanvasObject::DoWalker( parent, handler );
677 }
678 
680 {
681  return m_object;
682 }
683 
685 {
686  m_object = object;
687 }
688 
690 {
691  return new a2dExternalReference( *this, options, refs );
692 };
693 
694 //----------------------------------------------------------------------------
695 // a2dNameReference
696 //----------------------------------------------------------------------------
697 a2dNameReference::a2dNameReference()
698  : a2dText( wxT( "" ) , 0, 0 )
699 {
700  m_text = wxT( "nameref" );
701 }
702 
703 a2dNameReference::a2dNameReference( double x, double y, a2dCanvasObject* obj, const wxString& text, double angle, const a2dFont& font )
704  : a2dText( text, x, y, font, angle )
705 {
706  if ( m_text.IsEmpty() && obj )
707  m_text = obj->GetName();
708  else
709  m_text = text;
710 
711  m_objectRef = obj;
712 }
713 
714 a2dNameReference::a2dNameReference( const a2dNameReference& other, CloneOptions options, a2dRefMap* refs )
715  : a2dText( other, options, refs )
716 {
717  m_objectRef = other.m_objectRef;
718 }
719 
720 a2dNameReference::~a2dNameReference()
721 {
722 }
723 
725 {
726  return m_objectRef;
727 }
728 
730 {
731  m_objectRef = object;
732 }
733 
735 {
736  return new a2dNameReference( *this, options, refs );
737 }
738 
740 {
741  if ( m_objectRef )
742  m_objectRef->AddPending( ic );
743 }
744 
746 {
747  if ( m_objectRef )
748  return m_objectRef;
749  return this;
750 }
751 
753 {
754  if( !other )
755  return false;
756 
757 #if defined(_DEBUG)
758  wxString name = other->GetName();
759 #endif
760 
761  if ( m_objectRef.Get() )
762  return false;
763 
765  m_objectRef->SetCheck( true );
766  return true;
767 }
768 
769 void a2dNameReference::DoWalker( wxObject* parent, a2dWalkerIOHandler& handler )
770 {
771  if ( m_objectRef.Get() )
772  m_objectRef->Walker( this, handler );
773 
774  a2dCanvasObject::DoWalker( parent, handler );
775 }
776 
777 bool a2dNameReference::DoUpdate( UpdateMode mode, const a2dBoundingBox& childbox, const a2dBoundingBox& clipbox, const a2dBoundingBox& propbox )
778 {
779  bool calc = false;
780  if ( m_objectRef )
781  {
782  calc = m_objectRef->Update( mode );
783  }
784 
785  return a2dText::DoUpdate( mode, childbox, clipbox, propbox );
786 }
787 
788 #if wxART2D_USE_CVGIO
789 void a2dNameReference::DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite )
790 {
791  a2dText::DoSave( parent, out, xmlparts, towrite );
792  if ( xmlparts == a2dXmlSer_attrib )
793  {
794  if ( m_objectRef )
795  out.WriteAttribute( wxT( "object" ), m_objectRef->GetUniqueSerializationId() );
796  }
797  else
798  {
799  //if object is not saved yet, we need to save it here.
800  if ( m_objectRef && !m_objectRef->GetCheck() )
801  {
802  //trick the system to have multiple refs on those objects, else we will not get an id attribute
803  a2dCanvasObjectPtr multiRef = m_objectRef;
804 
805  out.WriteStartElement( wxT( "derived" ) );
806  m_objectRef->Save( this, out, towrite );
807  out.WriteEndElement();
808  }
809  }
810 }
811 
812 void a2dNameReference::DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts )
813 {
814  a2dText::DoLoad( parent, parser, xmlparts );
815  if ( xmlparts == a2dXmlSer_attrib )
816  {
817  if ( parser.HasAttribute( wxT( "object" ) ) )
818  {
819  parser.ResolveOrAdd( ( a2dSmrtPtr<class a2dObject>* ) &m_objectRef, parser.GetAttributeValue( wxT( "object" ) ) );
820  }
821  }
822  else
823  {
824  if ( parser.GetTagName() != wxT( "derived" ) )
825  return;
826 
827  parser.Require( START_TAG, wxT( "derived" ) );
828  parser.Next();
829 
830  m_objectRef = (a2dCanvasObject*) parser.LoadOneObject( this );
831 
832  parser.Require( END_TAG, wxT( "derived" ) );
833  parser.Next();
834  }
835 }
836 #endif //wxART2D_USE_CVGIO
837 
838 //----------------------------------------------------------------------------
839 // a2dSymbolicReference
840 //----------------------------------------------------------------------------
841 
842 a2dSymbolicReference::a2dSymbolicReference()
843  : a2dCanvasObject()
844 {
845 }
846 
847 
848 a2dSymbolicReference::a2dSymbolicReference( double x, double y, a2dCanvasObject* obj )
849 
850  : a2dCanvasObject()
851 {
852  m_object = obj;
853 }
854 
855 a2dSymbolicReference::a2dSymbolicReference( const a2dSymbolicReference& other, CloneOptions options, a2dRefMap* refs )
856  : a2dCanvasObject( other, options, refs )
857 {
858  m_object = other.m_object;
859 }
860 
861 a2dSymbolicReference::~a2dSymbolicReference()
862 {
863 }
864 
866 {
867  return new a2dSymbolicReference( *this, options, refs );
868 }
869 
870 #if wxART2D_USE_CVGIO
871 void a2dSymbolicReference::DoSave( wxObject* parent, a2dIOHandlerXmlSerOut& out, a2dXmlSer_flag xmlparts , a2dObjectList* towrite )
872 {
873  a2dCanvasObject::DoSave( parent, out, xmlparts, towrite );
874 }
875 
876 void a2dSymbolicReference::DoLoad( wxObject* parent, a2dIOHandlerXmlSerIn& parser, a2dXmlSer_flag xmlparts )
877 {
878  a2dCanvasObject::DoLoad( parent, parser, xmlparts );
879 }
880 #endif //wxART2D_USE_CVGIO
881 
883 {
884  return a2dCanvasObject::DoIsHitWorld( ic, hitEvent );
885 }
886 
a2dHit m_how
return in which way the object was hit (stroke, fill, ...)
Definition: canobj.h:301
a2dCanvasObject * GetCanvasObject()
Definition: recur.cpp:104
void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
Definition: recur.cpp:377
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
Definition: cantext.cpp:822
virtual void MakeReferencesUnique()
All direct a2dCanvasObject which are part of this one are made unique.
Definition: canobj.cpp:5440
double m_relx
(world coordinates) hit point x relative to the canvas object its parent object(s) ...
Definition: canobj.h:289
virtual void Render(a2dIterC &ic, OVERLAP clipparent)
Render this object to the active a2dDrawingPart.
Definition: canobj.cpp:4712
void SetRoot(a2dDrawing *root, bool recurse=true)
Sets this object to a a2dCanvasDocument.
Definition: canobj.cpp:5933
virtual bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
Definition: canobj.cpp:3713
a2dCanvasObjectList * CreateChildObjectList()
create and get the list where the child objects are stored in.
Definition: canobj.cpp:2561
a2dCanvasObjectReference is a reference to any a2dCanvasObject derived class.
Definition: recur.h:53
void RemoveHierarchy()
move childs of childs and members which have hierarchy one level up to this object its child list...
Definition: recur.cpp:428
a2dObject * LoadOneObject(wxObject *parent)
load one object from a CVG file.
bool HasAttribute(const wxString &attrib)
Does the current tag have this attribute?
Definition: genxmlpars.cpp:560
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...
Definition: recur.cpp:311
virtual a2dCanvasObject * PushInto(a2dCanvasObject *parent)
when wanting to traverse hierarchy what level is down here.
Definition: recur.cpp:745
void AddPending(a2dIterC &ic)
search objects ( if nested recursive ) that have the pending flag Set
Definition: canobj.cpp:4521
int WorldToDeviceY(double y) const
convert y from world to device coordinates
Definition: drawer2d.h:455
virtual wxString GetName() const
Returns the name of this object, if no name is given the internal id will be returned.
Definition: gen.cpp:1310
const a2dStroke * a2dBLACK_STROKE
global a2dStroke stock object for BLACK stroking
virtual void PopTransform(void)
Recall the previously saved user-to-world transform off the matrix stack.
Definition: drawer2d.cpp:480
void SetRelease(bool value)
set release flag
Definition: gen.h:1346
XMLeventType Next()
Walks to next element and returns event type.
Definition: genxmlpars.cpp:422
bool ResolveOrAdd(a2dSmrtPtr< a2dObject > *storedHere, const wxString &id=wxT(""))
try to resolve the object that is in storedHere when it is a reference.
Definition: gen.cpp:4760
class to map references to objects stored in XML, in order to make the connection later on...
Definition: gen.h:3462
void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
Write object specific CVG data.
Definition: recur.cpp:789
a2dDrawing * m_root
root group for rendering and accessing the canvas&#39;s also contains layer settings
Definition: canobj.h:2525
a2dCanvasOFlags m_flags
holds flags for objects
Definition: canobj.h:2528
a2dNameReference is a text like object, but next to that it holds a reference
Definition: recur.h:327
a2dSymbolicReference does not render referenced object.
Definition: recur.h:383
Ref Counted base object.
Definition: gen.h:1045
void SetTransformMatrix(const a2dAffineMatrix &mat=a2dIDENTITY_MATRIX)
Returns the matrix used to position the object.
Definition: canobj.h:509
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
Load object specific CVG data.
Definition: cantext.cpp:536
a2dObject * Clone(CloneOptions options, a2dRefMap *refs=NULL) const
create an exact copy of this property
Definition: gen.cpp:1199
bool IsHit() const
true if this is a hit
Definition: polyver.h:107
virtual bool Update(UpdateMode mode)
Update the state of the object according to its current position etc.
Definition: canobj.cpp:5149
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
Definition: recur.cpp:871
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
Definition: recur.cpp:230
Defines a font to be set to a2dDrawer2D or stored in a2dCanvsObject etc.
Definition: stylebase.h:779
virtual void RemoveHierarchy()
move childs of childs and members which have hierarchy one level up to this object its child list...
Definition: canobj.cpp:6160
Input and output handler for the XmlSer format.
Definition: genxmlpars.h:819
UpdateMode
Various mode flags for Update.
Definition: canobj.h:1091
virtual void DoAddPending(a2dIterC &ic)
called by addPending
Definition: recur.cpp:739
virtual void SetPending(bool pending)
set this object pending for update
Definition: canobj.cpp:2585
OVERLAP
Result of a a2dBoundingBox intersection or hittest.
Definition: bbox.h:24
bool m_visiblechilds
child objects are visible or not
Definition: candefs.h:292
virtual void DoAddPending(a2dIterC &ic)
called by addPending
Definition: recur.cpp:81
bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
Definition: canimage.cpp:341
void RemoveHierarchy()
move childs of childs and members which have hierarchy one level up to this object its child list...
Definition: recur.cpp:263
double GetTransformedHitMargin()
transformed to object its coordinate system
Definition: canobj.cpp:616
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
Definition: recur.cpp:593
wxUint16 m_layer
layer of object, default wxLAYER_DEFAULT
Definition: canobj.h:2556
virtual void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
Definition: canobj.cpp:5728
void DoWalker(wxObject *parent, a2dWalkerIOHandler &handler)
iterate over this object and its children
Definition: recur.cpp:674
OVERLAP GetClipStatus(a2dIterC &ic, OVERLAP clipparent)
used for deciding if the object needs to be rendered against the current clipping area of the active ...
Definition: canobj.cpp:3273
bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
Definition: recur.cpp:409
a2dCanvasObject is the base class for Canvas Objects.
Definition: canobj.h:371
void SetSize(double size)
Set the font size.
Definition: stylebase.cpp:2909
void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
Definition: recur.cpp:207
a2dAffineMatrix a2dIDENTITY_MATRIX
global a2dAffineMatrix to set/pass the identity matrix.
Definition: afmatrix.cpp:51
a2dCanvasObjectArrayReference is an array of a reference to any a2dCanvasObject derived class...
Definition: recur.h:131
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
Load object specific CVG data.
Definition: recur.cpp:812
void TransformPoint(double x, double y, double &tx, double &ty) const
Transform a point.
Definition: afmatrix.cpp:559
special a2dCanvasObject which are used to create hierarchy different from the standard a2dCanvasObjec...
bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
Definition: recur.cpp:256
virtual void SetName(const wxString &name)
Creates the a2dStringProperty PROPID_Name.
Definition: gen.cpp:1305
void WriteEndElement(bool newLine=true)
Writes correspondending end tag for the current start tag.
Definition: genxmlpars.cpp:862
a2dCanvasObject * GetCanvasObject()
Definition: recur.cpp:553
a2dCanvasObject * GetSymbol()
Definition: recur.cpp:575
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
Definition: recur.cpp:580
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
Definition: recur.cpp:734
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
Definition: recur.cpp:393
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
Definition: recur.cpp:65
a2dAffineMatrix m_lworld
used for positioning the object (x,y,ang,scale etc.)
Definition: canobj.h:2559
bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
Definition: recur.cpp:634
Io handler to iterate through a a2dDocument.
Definition: gen.h:3911
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...
Definition: recur.cpp:138
a2dCanvasObjectPtr m_object
object to which a reference is held.
Definition: recur.h:312
bool GetCheck() const
general flag use at will.
Definition: gen.h:1342
void WriteNewLine()
Writes a new line and takes care of indentation.
Definition: genxmlpars.cpp:890
a2dText is an abstract base class.
Definition: cantext.h:93
virtual bool LinkReference(a2dObject *other)
when resolving this refrence via a a2dIOHandler, this is used.
Definition: recur.cpp:752
bool GetValid() const
returns true if boundingbox is calculated properly and therefore its valid flag is set...
Definition: bbox.cpp:299
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
Definition: canimage.cpp:384
void Expand(const a2dPoint2D &, const a2dPoint2D &)
expand boundingbox width two points
Definition: bbox.cpp:155
const a2dBoundingBox & Translate(a2dPoint2D &)
translate with given vector
Definition: bbox.cpp:370
virtual a2dBoundingBox GetUnTransformedBbox(a2dBboxFlags flags=a2dCANOBJ_BBOX_CHILDREN) const
Get boundingbox without the affine matrix transform included.
Definition: canobj.cpp:5036
double GetMinX() const
get minimum X of the boundingbox
Definition: bbox.cpp:304
void SetCanvasObject(a2dCanvasObject *object)
set the object that is referenced
Definition: recur.cpp:109
void Walker(wxObject *parent, a2dWalkerIOHandler &handler)
This is used to recursively walk through an object tree.
Definition: gen.cpp:1473
Definition: bbox.h:26
a2dDrawer2D * GetDrawer2D() const
get current a2dDrawer2D
Definition: canobj.cpp:636
#define wxStaticCast(obj, className)
The wxWindows 2.4.2 wxStaticCast is buggy. It evaluates its argument twice.
Definition: gen.h:123
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
Definition: recur.cpp:777
a2dImage (will scale/rotate image when needed)
Definition: canimage.h:33
a2dExternalReference is a text like object, but next to that it holds a reference ...
Definition: recur.h:286
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
Definition: canobj.cpp:5569
a2dCanvasObjectPtr m_object
object to which a reference is hold.
Definition: recur.h:267
int WorldToDeviceX(double x) const
convert x from world to device coordinates
Definition: drawer2d.h:453
virtual void DrawLine(double x1, double y1, double x2, double y2)
Draw line in world coordinates.
Definition: drawer2d.cpp:2167
Input and output handler for the XmlSer format.
Definition: genxmlpars.h:862
bool m_ignoreLayer
when this is set DoRender() is called even if layer of the object is not the layer to be rendered...
Definition: candefs.h:336
a2dCanvasObject(double x=0, double y=0)
constructor called by derived objects
Definition: canobj.cpp:1391
void RenderObject(a2dCanvasObject *torender, int imagew=100, int imageh=100)
render the given object into the image of this object
Definition: canimage.cpp:217
void SetCheck(bool check)
general flag use at will.
Definition: gen.h:1339
A 2x3 affine matrix class for 2D transformations.
Definition: afmatrix.h:53
double GetMaxX() const
get maximum X of the boundingbox
Definition: bbox.cpp:316
a2dCanvasObjectPtr m_objectRef
object to which a reference is held.
Definition: recur.h:368
while iterating a a2dCanvasDocument, this holds the context.
Definition: canobj.h:3212
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
Definition: recur.cpp:616
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
Definition: canimage.cpp:305
virtual void DoWalker(wxObject *parent, a2dWalkerIOHandler &handler)
iterate over this object and its children
Definition: recur.cpp:130
void MapBbox(const a2dAffineMatrix &matrix)
Definition: bbox.cpp:445
bool DoIsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
Does hit test on the object (exclusif child objects)
Definition: recur.cpp:882
Definition: bbox.h:28
a2dCanvasObject * GetCanvasObject()
Definition: recur.cpp:724
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
Definition: recur.cpp:297
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
Write object specific CVG data.
Definition: cantext.cpp:568
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
Definition: recur.cpp:165
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
Definition: recur.cpp:689
wxString GetAttributeValue(const wxString &attrib, const wxString &defaultv=wxT(""))
Returns the value of an attribute.
Definition: genxmlpars.cpp:450
int RequireAttributeValueInt(const wxString &attrib)
Forces an attribute and returns its integer value.
Definition: genxmlpars.cpp:508
int GetOwnedBy()
like it to be protected, but this does not work with wxList macros
Definition: gen.h:1173
void SetSymbol(a2dCanvasObject *symbol)
set the object that is used as icon
Definition: recur.cpp:564
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
Definition: recur.cpp:629
bool GetRelease() const
get release flag
Definition: gen.h:1350
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
Definition: recur.cpp:148
bool GetRenderChildDerived()
when set child object in derived a2dCanvasObject are rendered, else only the object itself...
Definition: canobj.h:3436
void MakeReferencesUnique()
All direct a2dCanvasObject which are part of this one are made unique.
Definition: recur.cpp:114
This is the base class for all kinds of property id&#39;s for a2dObject.
Definition: id.h:154
double GetMaxY() const
get maximum Y of the boundingbox
Definition: bbox.cpp:322
double GetWidth() const
returns width of the boundingbox
Definition: bbox.cpp:328
An object of this class will update a a2dIterC with the required information.
Definition: canobj.h:3123
void Require(const XMLeventType &type, wxString name)
Forces a special tag.
Definition: genxmlpars.cpp:390
list for a2dCanvasObject
wxString GetTagName()
Returns name of the current XML tag.
Definition: genxmlpars.cpp:565
void DoLoad(wxObject *parent, a2dIOHandlerXmlSerIn &parser, a2dXmlSer_flag xmlparts)
load object specific CVG data
Definition: recur.cpp:876
virtual a2dObject * DoClone(CloneOptions options, a2dRefMap *refs) const
Clone this object and return a pointer to the new object.
Definition: recur.cpp:865
bool Translate(double x, double y)
Translate by dx, dy:
Definition: afmatrix.cpp:420
void DoRender(a2dIterC &ic, OVERLAP clipparent)
render derived object
Definition: recur.cpp:345
a2dCanvasObject * GetCanvasObject()
Definition: recur.cpp:679
void SetCanvasObject(a2dCanvasObject *object)
set the object that is referenced
Definition: recur.cpp:729
a2dCanvasObject * IsHitWorld(a2dIterC &ic, a2dHitEvent &hitEvent)
If the position (x,y) is within the object return this.
Definition: canobj.cpp:3415
The a2dBoundingBox class stores one a2dBoundingBox of a a2dCanvasObject.
Definition: bbox.h:39
void SetCanvasObject(a2dCanvasObject *object)
set the object that is referenced
Definition: recur.cpp:684
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...
Definition: recur.cpp:585
double GetMinY() const
get minimum Y of the boundingbox
Definition: bbox.cpp:310
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 DoWalker(wxObject *parent, a2dWalkerIOHandler &handler)
iterate over this object and its children
Definition: recur.cpp:769
a2dLibraryReference is a symbol object, it holds a reference
Definition: recur.h:215
virtual void Save(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dObjectList *towrite)
write all needed to an XML type of file called the CVG format
Definition: gen.cpp:1343
virtual bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
Definition: canobj.cpp:5098
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...
Definition: canimage.cpp:296
virtual bool LinkReference(a2dObject *other)
when resolving this refrence via a a2dIOHandler, this is used.
Definition: recur.cpp:87
This template class is for property ids with a known data type.
Definition: id.h:477
a2dBoundingBox m_bbox
boundingbox in world coordinates
Definition: canobj.h:2539
Walker taking iterative context into account.
Definition: algos.h:1208
double RequireAttributeValueDouble(const wxString &attrib)
Forces an attribute and returns its double value.
Definition: genxmlpars.cpp:487
virtual void DoSave(wxObject *parent, a2dIOHandlerXmlSerOut &out, a2dXmlSer_flag xmlparts, a2dObjectList *towrite)
write object specific CVGL data
Definition: recur.cpp:624
virtual a2dCanvasObject * PushInto(a2dCanvasObject *parent)
when wanting to traverse hierarchy what level is down here.
Definition: recur.cpp:123
wxString m_text
the text to display
Definition: cantext.h:381
const a2dAffineMatrix & GetTransform() const
Get the accumulated transform up to and including m_lworld of the current object. ...
Definition: canobj.cpp:663
list of a2dObject&#39;s
Definition: gen.h:3157
double m_rely
(world coordinates) hit point y relative to the canvas object its parent object(s) ...
Definition: canobj.h:291
bool DoUpdate(UpdateMode mode, const a2dBoundingBox &childbox, const a2dBoundingBox &clipbox, const a2dBoundingBox &propbox)
Update derived Object specific things ( mainly boundingbox)
Definition: recur.cpp:334
CloneOptions
options for cloning
Definition: gen.h:1200
void WalkerWithContext(a2dIterC &ic, wxObject *parent, a2dWalkerIOHandlerWithContext &handler)
This is used to recursively walk through an object tree.
Definition: canobj.cpp:5446
structure to give as parameter to member functions of a2dCanvasObject
Definition: canobj.h:252
a2dBoundingBox & GetBbox()
get boundingbox in world coordinates exclusive stroke width relative to its parent ...
Definition: canobj.cpp:3175
void SetFill(const a2dFill &fill)
Set a fill for the object which will be used instead of the layer fill.
Definition: canobj.cpp:2874
wxInt64 GetUniqueSerializationId() const
return a unique id for this object
Definition: gen.cpp:1450
void DoWalker(wxObject *parent, a2dWalkerIOHandler &handler)
iterate over this object and its children
Definition: recur.cpp:543
virtual void PushIdentityTransform()
push no transform, to draw directly in device coordinates
Definition: drawer2d.cpp:469
void SetCanvasObject(a2dCanvasObject *object)
set the object that is referenced
Definition: recur.cpp:558
virtual void DoWalker(wxObject *parent, a2dWalkerIOHandler &handler)
iterate over this object and its children
Definition: canobj.cpp:5504
const a2dFill * a2dTRANSPARENT_FILL
global a2dFill stock object for TRANSPARENT filling
general canvas module declarations and classes
void WriteStartElement(const wxString &name, bool newLine=true)
Writes start tag which has no attributes.
Definition: genxmlpars.cpp:738
recur.cpp Source File -- Sun Oct 12 2014 17:04:23 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation