1 -- Created on: 1996-01-25
2 -- Created by: s: LAVNIKOV Alexey & PLOTNIKOV Eugeny
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
22 class WDriver from WNT inherits WindowDriver from Aspect
24 ---Purpose: This class defines Windows NT window driver
28 ExtendedString from TCollection,
32 PlaneAngle from Quantity,
33 Array1OfShortReal from TShort,
34 TypeOfResize from Aspect,
35 TypeOfDrawMode from Aspect,
36 TypeOfText from Aspect,
45 HArray1OfInteger from TColStd,
46 FontMapEntry from WNT,
49 HListOfMFTFonts from WNT,
50 HArray1OfShortReal from TShort,
55 DriverDefinitionError from Aspect,
56 DriverError from Aspect
60 Create ( aWindow : Window from WNT )
61 returns mutable WDriver from WNT
62 raises DriverDefinitionError from Aspect;
64 ---Purpose: Creates Windows NT window driver associated
65 -- with the Windows NT window
68 Destroy ( me : mutable )
69 raises DriverError from Aspect is virtual;
71 ---Purpose: Destroy the Driver
72 ---Category: Methods to modify the class definition
75 SelectBuffer( me; aRetainBuffer: Integer from Standard) returns Address from Standard;
77 ---Purpose: Selects RetainBuffer for output
78 ---Category: Methods to manage buffers
83 aDoubleBuffer : Boolean = Standard_True;
84 aRetainBuffer : Integer = 0
86 ---Purpose: Begin graphics and drawn directly to the Window or Pixmap if
87 --<aRetainBuffer> is 0 or in the retain buffer if > 0.
88 raises DriverError from Aspect is virtual;
89 ---Trigger: Raises if the retain buffer is not open.
90 -- call BufferIsOpen() method before.
92 EndDraw ( me : mutable; aSynchronize : Boolean = Standard_False ) is virtual;
94 ---Purpose: Called by the method Graphic2d_View::Update, this
95 -- method manages the buffer flushing and Wait after up to date
96 -- display when Synchronize is TRUE.
97 ---Category: Methods to modify the class definition
99 ResizeSpace ( me: mutable )
100 returns TypeOfResize from Aspect
102 ---Purpose: Resizes the WorkSpace depending of the Window size
103 -- MUST be call after a Resize or Move WindowDriver Event
104 -- Returns the TypeOfResize gravity mode.
105 -- Trigger: Raises if the type of resizing is unknown.
106 raises DriverError from Aspect is virtual;
107 ---Category: Methods to modify the class definition
110 ---------------------------------------------
111 -- Category: Methods to set the attributes
112 ---------------------------------------------
115 SetHighlightColor ( me; aColorIdx : Integer from Standard )
116 returns Boolean from Standard is static;
118 ---Purpose: Sets the highlight color for the drawing. Returns False
119 -- if the graphic device does not support palette mechanism.
123 aMode : TypeOfDrawMode from Aspect
127 ---Purpose: Change the current drawing mode of the Driver
128 -- TODM_REPLACE : the primitive is drawn with his defined color.
129 -- TODM_ERASE : the primitive is erased from the window.
130 -- TODM_XOR : the primitive is xored to the window.
131 -- TODM_XORLIGHT: the primitive is xored depending of the current
132 -- highlight and background colors.
136 ColorIndex : Integer from Standard;
137 TypeIndex : Integer from Standard;
138 WidthIndex : Integer from Standard
141 ---Purpose: Sets the line attributes.
142 -- Category: Methods to set the line attributes
143 -- Trigger: Raises if one of the index is out of range.
144 raises DriverError from Aspect is virtual;
148 ColorIndex : Integer from Standard;
149 FontIndex : Integer from Standard
152 ---Purpose: Sets the text attributes.
153 -- Category: Methods to set the text attributes
154 -- Trigger: Raises if one of the index is out of range.
155 raises DriverError from Aspect is virtual;
159 ColorIndex : Integer from Standard;
160 FontIndex : Integer from Standard;
161 aSlant : PlaneAngle from Quantity;
162 aHScale : Factor from Quantity;
163 aWScale : Factor from Quantity;
164 isUnderlined : Boolean from Standard = Standard_False
167 ---Purpose: Sets the Extended text attributes.
168 -- Category: Methods to set the text attributes
169 -- Trigger: Raises if one of the index is out of range.
170 raises DriverError from Aspect is virtual;
174 ColorIndex : Integer from Standard;
175 TileIndex : Integer from Standard;
176 DrawEdgeFlag : Boolean from Standard = Standard_False
179 ---Purpose: Sets the polygon attributes.
181 -- <ColorIndex> is the background poly color index.
182 -- <TileIndex> is the background poly fill rule index.
183 -- If <DrawEdgeFlag> is TRUE the edge of the poly is drawn with the
184 -- current line attributes.
185 -- Category: Methods to set the poly attributes
186 -- Trigger: Raises if one of the index is out of range.
187 raises DriverError from Aspect is virtual;
191 ColorIndex : Integer from Standard;
192 TileIndex : Integer from Standard;
193 PolygonMode : Integer from Standard;
194 DrawEdgeFlag : Boolean from Standard = Standard_False
197 ---Purpose: Sets the polygon attributes.
199 -- <PolygonMode> way to fill consecutive lines
200 -- Category: Methods to set the poly attributes
201 -- Trigger: Raises if one of the index is out of range.
202 raises DriverError from Aspect;
206 ColorIndex : Integer from Standard;
207 EdgeWidthIndex : Integer from Standard;
208 FillMarker : Boolean from Standard = Standard_False
211 ---Purpose: Sets the marker attributes.
213 -- <ColorIndex> is the edge or fill marker color index.
214 -- <EdgeWidthIndex> is the edge marker thickness index.
215 -- If <FillMarker> is TRUE the marker is filled on the first set
216 -- of consecutive drawn points.
217 -- Trigger: Raises if one of the index is out of range.
218 raises DriverError from Aspect is virtual;
221 -----------------------------------------
222 -- Category: Methods to manage the images
223 -----------------------------------------
225 IsKnownImage ( me : mutable; anImage : Transient from Standard )
226 returns Boolean from Standard is virtual;
228 ---Purpose: Returns Standard_True if the associated driver
229 -- have stored the image and Standard_False if not.
233 anImageFile : CString from Standard;
234 aWidth,aHeight : out Integer from Standard
236 returns Boolean from Standard is virtual;
238 ---Purpose: Returns Standard_True and the Image Size in PIXEL
239 -- if the image file exist and can be computed by the driver,
240 -- NOTE that only XWD and DIB image file type are recognized
245 anImageId : Transient from Standard
249 ---Purpose: Clears the image in <me>.
253 anImageFile : CString from Standard
257 ---Purpose: Clears the image associated with the image file.
261 anImageId : Transient from Standard;
262 aX, aY : ShortReal from Standard
265 ---Purpose: Draws the image in <me>.
266 -- <aX>, <aY> is the center of the image.
267 -- Image center must be defined in DWU space.
268 raises DriverError from Aspect is virtual;
269 ---Trigger: If the anImageId is not found
273 anImageFile : CString from Standard;
274 aX, aY : ShortReal from Standard;
275 aScale : Factor from Quantity = 1.0
278 ---Purpose: Draws the image file in <me>.
279 -- <aX>, <aY> is the center of the image.
280 -- <aScale> the scale factor which is apply on this image
281 -- Image center must be defined in DWU space.
282 -- anImageFile must be defined with the full pathname
283 -- of the form dev:\path\name.ext or $DIR\name.ext
284 -- with DIR defined in a setenv variable.
285 raises DriverError from Aspect is virtual;
286 ---Trigger: If the anImageFile is not found
287 -- or the Image type is neither XWD nor DIB.
291 anImageId : Transient from Standard;
292 aX, aY : ShortReal from Standard;
293 Width, Height : Integer from Standard;
294 anArrayOfPixels : Address from Standard
297 ---Purpose: Stores a complete image and draws it in <me>.
298 -- Image size must be defined in DWU space>
299 -- Trigger: Raises if the creation of the image failed.
300 raises DriverError from Aspect is virtual;
304 anImageId : Transient from Standard;
305 aX, aY : ShortReal from Standard;
306 anIndexOfLine, Width, Height : Integer from Standard;
307 anArrayOfPixels : Address from Standard
310 ---Purpose: Stores a line of an image and draws it in <me>.
311 -- Warning: 0<= anIndexOfLine < aHeight
312 -- anIndexOfLine = 0 must be the first call
313 -- Trigger: Raises if the creation of the image failed.
314 raises DriverError from Aspect is virtual;
317 ---------------------------------------
318 -- Category: Methods to draw primitives
319 ---------------------------------------
324 ListX : Array1OfShortReal from TShort;
325 ListY : Array1OfShortReal from TShort
328 ---Purpose: Draws the polyline depending of SetLineAttrib() attributes.
329 -- Warning: Coordinates must be defined in DWU space.
330 -- Trigger: Raises if Polyline has too many points (> 1024)
331 -- Raises if the length of <ListX> is not equal to
332 -- the length of <ListY>.
333 raises DriverError from Aspect is virtual;
337 ListX : Array1OfShortReal from TShort;
338 ListY : Array1OfShortReal from TShort
341 ---Purpose: Draws the polygone depending of SetPolyAttrib() attributes.
342 -- Warning: Coordinates must be defined in DWU space.
343 -- Trigger: Raises if Polygone has too many points (> 1024)
344 -- Raises if the length of <ListX> is not equal to
345 -- the length of <ListY>.
346 raises DriverError from Aspect is virtual;
350 X1, Y1 : ShortReal from Standard;
351 X2, Y2 : ShortReal from Standard
354 ---Purpose: Draws the segment depending of SetLineAttrib() attributes.
355 -- Warning: Coordinates must be defined in DWU space.
356 raises DriverError from Aspect is virtual;
360 Text : ExtendedString from TCollection;
361 Xpos, Ypos : ShortReal from Standard;
362 anAngle : ShortReal from Standard = 0.0;
363 aType : TypeOfText from Aspect = Aspect_TOT_SOLID
366 ---Purpose: Draws the text depending of SetTextAttrib() attributes.
367 -- Warning: Coordinates must be defined in DWU space.
368 -- Trigger: Raises if Text has too many chars (> 1024)
369 raises DriverError from Aspect is virtual;
373 Text : CString from Standard;
374 Xpos, Ypos : ShortReal from Standard;
375 anAngle : ShortReal from Standard = 0.0;
376 aType : TypeOfText from Aspect = Aspect_TOT_SOLID
379 ---Purpose: Draws the text depending of SetTextAttrib() attributes.
380 -- Warning: Coordinates must be defined in DWU space.
381 -- Angle must be defined in RADIAN.
382 -- Trigger: Raises if Text has too many chars (> 1024)
383 raises DriverError from Aspect is virtual;
387 aText : ExtendedString from TCollection;
388 Xpos : ShortReal from Standard;
389 Ypos : ShortReal from Standard;
390 aMarge : Ratio from Quantity = 0.1;
391 anAngle : ShortReal from Standard = 0.0;
392 aType : TypeOfText from Aspect = Aspect_TOT_SOLID
395 ---Purpose: Draws an framed text depending of the
396 -- SetTextAttrib() and SetPolyAttrib() attributes.
397 -- Warning: Coordinates must be defined in DWU space.
398 -- <aMarge> defines the ratio of the space between the
399 -- polygon borders and the bounding box of the text and
400 -- depending of the height of the text.
401 -- Trigger: Raises if Text has too many chars (> 1024)
402 -- or <aMarge is < 0 or > 1.
403 raises DriverError from Aspect is virtual;
407 aText : CString from Standard;
408 Xpos : ShortReal from Standard;
409 Ypos : ShortReal from Standard;
410 aMarge : Ratio from Quantity = 0.1;
411 anAngle : ShortReal from Standard = 0.0;
412 aType : TypeOfText from Aspect = Aspect_TOT_SOLID
415 ---Purpose: Draws an framed text depending of the
416 -- SetTextAttrib() and SetPolyAttrib() attributes.
417 -- Warning: Coordinates must be defined in DWU space.
418 -- <aMarge> defines the ratio of the space between the
419 -- polygon borders and the bounding box of the text and
420 -- depending of the height of the text.
421 -- Trigger: Raises if Text has too many chars (> 1024)
422 -- or <aMarge is < 0 or > 1.
423 raises DriverError from Aspect is virtual;
425 DrawPoint ( me : mutable; X, Y : ShortReal from Standard )
427 ---Purpose: Draws a 1 PIXEL point depending of the SetMarkerAttrib()
428 -- color attribute or add a point depending of the incremental
429 -- BeginXxxxxx() primitive used.
430 raises DriverError from Aspect is virtual;
434 aMarker : Integer from Standard;
435 Xpos, Ypos : ShortReal from Standard;
436 Width, Height : ShortReal from Standard;
437 Angle : ShortReal from Standard = 0.0
440 ---Purpose: Draws the previously defined marker depending of
441 -- the SetMarkerAttrib() attributes.
442 -- Warning: Coordinates and sizes must be defined in DWU space.
443 -- Angle must be defined in RADIAN.
444 -- A one pixel marker is drawn when aMarker index is undefined.
445 raises DriverError from Aspect is virtual;
449 X, Y : ShortReal from Standard;
450 aXradius, aYradius : ShortReal from Standard;
451 aStartAngle : ShortReal from Standard = 0.0;
452 anOpenAngle : ShortReal from Standard = 6.283185
456 ---Purpose: Draws an Ellipsoid arc of center <X,Y> and Radius
457 -- <aXradius,aYradius> of relative angle <anOpenAngle> from
458 -- the base angle <aStartAngle>
459 -- Warning: Returns FALSE if the hardware can't drawing this
460 -- primitive properly,application must to simulate it.
461 -- Trigger: Raises if one of <aXradius,aYradius> is <= 0.
462 raises DriverError from Aspect is virtual;
466 X, Y : ShortReal from Standard;
467 anXradius, anYradius : ShortReal from Standard;
468 aStartAngle : ShortReal from Standard = 0.0;
469 anOpenAngle : ShortReal from Standard = 6.283185
473 ---Purpose: Draws an filled Ellipsoid arc of center <X,Y> and Radius
474 -- <anXradius,anYradius> of relative angle <anOpenAngle> from
475 -- the base angle <aStartAngle> and depending of the
476 -- SetPolyAttrib() attributes.
477 -- Warning: Returns FALSE if the hardware can't drawing this
478 -- primitive properly,application must to simulate it.
479 -- Trigger: Raises if one of <aXradius,aYradius> is <= 0.
480 raises DriverError from Aspect is virtual;
482 BeginPolyline ( me : mutable; aNumber : Integer ) is virtual;
484 ---Purpose: Begin a polyline primitive of <aNumber> of points.
485 -- Warning: Points must be added by the DrawPoint() method.
487 BeginPolygon ( me : mutable; aNumber : Integer ) is virtual;
489 ---Purpose: Begin a polygon primitive of <aNumber> of points .
490 -- Warning: Points must be added by the DrawPoint() method.
492 BeginSegments ( me : mutable ) is virtual;
494 ---Purpose: Begin a set of segments .
495 -- Warning: Segments must be added by DrawSegment() method.
497 BeginArcs ( me : mutable ) is virtual;
499 ---Purpose: Begin a set of circles or ellips .
500 -- Warning: Arcs must be added by the DrawArc() method.
502 BeginPolyArcs ( me : mutable ) is virtual;
504 ---Purpose: Begin a set of polygon circles or ellips .
505 -- Warning: Arcs must be added by the DrawPolyArc() method.
507 BeginMarkers ( me : mutable ) is virtual;
509 ---Purpose: Begin a set of markers .
510 -- Warning: Markers must be added by the DrawMarker() method.
512 BeginPoints ( me : mutable ) is virtual;
514 ---Purpose: Begin a set of points .
515 -- Warning: Points must be added by the DrawPoint() method.
517 ClosePrimitive ( me : mutable )
519 ---Purpose: Close the last Begining primitive
520 -- Trigger: Raises if no primitive have been opened by BeginXxxxxx().
521 raises DriverError from Aspect is virtual;
524 ---------------------------------------------
525 -- Category: Methods to define the attributes
526 ---------------------------------------------
531 Colormap : ColorMap from Aspect
534 ---Purpose: Defines the color map.
536 -- Trigger: Raises if the definition failed.
537 raises DriverError from Aspect is virtual protected;
538 ---Category: Methods to define the color indices.
542 Typemap : TypeMap from Aspect
544 ---Purpose: Defines the line type map.
546 -- Trigger: Raises if the definition failed.
547 raises DriverError from Aspect is virtual protected;
548 ---Category: Methods to define the type of line indices.
552 Widthmap : WidthMap from Aspect
554 ---Purpose: Defines the width line map.
556 -- Trigger: Raises if the definition failed.
557 raises DriverError from Aspect is virtual protected;
558 ---Category: Methods to define the width of line indices.
562 Fontmap : FontMap from Aspect
564 ---Purpose: Defines the font map.
566 -- Trigger: Raises if the definition failed.
567 raises DriverError from Aspect is virtual protected;
568 ---Category: Methods to define the font indices.
572 Markmap : MarkMap from Aspect
574 ---Purpose: Defines the mark map.
576 -- Trigger: Raises if the definition failed.
577 raises DriverError from Aspect is virtual protected;
578 ---Category: Methods to define the marker indices.
581 -------------------------------------------------------------
582 -- Category: Methods to define or edit a buffer of primitives
583 -------------------------------------------------------------
586 aRetainBuffer : Integer;
590 aColorIndex : Integer;
591 aWidthIndex : Integer;
592 aTypeIndex : Integer;
593 aFontIndex : Integer;
594 aDrawMode : TypeOfDrawMode = Aspect_TODM_REPLACE
596 returns Address is private;
600 aRetainBuffer : Integer;
601 aPivotX : ShortReal = 0.0;
602 aPivotY : ShortReal = 0.0;
603 aWidthIndex : Integer = 0;
604 aColorIndex : Integer = 0;
605 aFontIndex : Integer = 0;
606 aDrawMode : TypeOfDrawMode = Aspect_TODM_REPLACE
608 returns Boolean is virtual;
609 ---Purpose: Allocate the retain buffer <aRetainBuffer> ,
610 -- Defines the DWU coordinates of the pivot point for all primitives
612 -- Defines the buffer color and font index :
613 -- the default color is the highlight color of the colormap.
614 -- the default font is the default system font of the fontmap.
615 -- The other attributes are fixed :
616 -- line type is Solid,
617 -- line width is 1 Pixel,
618 -- polygon fill mode is Solid,
619 -- Returns TRUE if the buffer is allocated and enabled for drawing.
623 aRetainBuffer : Integer;
624 aPivotX : ShortReal = 0.0;
625 aPivotY : ShortReal = 0.0;
626 aWidthIndex : Integer = 0;
627 aColorIndex : Integer = 0;
628 aFontIndex : Integer = 0;
629 aDrawMode : TypeOfDrawMode = Aspect_TODM_REPLACE
632 ---Purpose: Allocate the retain buffer <aRetainBuffer> ,
633 -- Defines the DWU coordinates of the pivot point for all primitives
635 -- Defines the buffer color and font index :
636 -- the default color is the highlight color of the colormap.
637 -- the default font is the default system font of the fontmap.
638 -- the default line type,
639 -- the default line width,
640 -- the default polygon fill mode,
641 -- Returns TRUE if the buffer is allocated and enabled for drawing.
646 aRetainBuffer: Integer
648 ---Purpose: Clear & Deallocate the retain buffer <aRetainBuffer>.
649 raises DriverError from Aspect is virtual;
650 ---Trigger: Raises if the retain buffer is not opened.
651 -- call BufferIsOpen() method before.
655 aRetainBuffer: Integer
657 ---Purpose: Erase & Clear ALL primitives retains in the buffer <aRetainBuffer>.
658 raises DriverError from Aspect is virtual;
659 ---Trigger: Raises if the retain buffer is not opened.
660 -- call BufferIsOpen() method before.
662 DrawBuffer ( me; aRetainBuffer : Integer )
663 ---Purpose: Draw ALL primitives retains in the buffer <aRetainBuffer>.
664 -- Warning: Note that the aspect of a retain buffer drawing is
665 -- mono-colored with the current buffer Attributes and
666 -- Depending of the DoubleBuffer state flag at the BeginDraw() buffer time,
667 -- when DB is TRUE,an XOR method is use for drawing and erasing buffers in the
668 -- same way.In this case,some color side effect can occurs depending of the
669 -- traversal primitive colors and the supported hardware.
670 -- when DB is FALSE and the background drawing has been generated with
671 -- DB at TRUE,no color side effect occurs because the DB is used for restoring
672 -- the drawing context at EraseBuffer() time,this is more powerfull for the
673 -- drawing quality excepted for large buffers (flicking) .
674 raises DriverError from Aspect is virtual;
675 ---Trigger: Raises if the retain buffer is not opened.
676 -- call BufferIsOpen() method before.
678 EraseBuffer ( me; aRetainBuffer : Integer )
679 ---Purpose: Erase ALL primitives retains in the buffer <aRetainBuffer>.
680 raises DriverError from Aspect is virtual;
681 ---Trigger: Raises if the retain buffer is not opened.
682 -- call BufferIsOpen() method before.
686 aRetainBuffer : Integer;
687 aPivotX : ShortReal = 0.0;
688 aPivotY : ShortReal = 0.0
690 ---Purpose: Erase , Translate and reDraw ALL primitives retains in the buffer
692 -- <aPivotX,aPivotY> are the new DWU attached point absolute coordinates
693 -- of the buffer pivot point.
694 raises DriverError from Aspect is virtual;
695 ---Trigger: Raises if the retain buffer is not opened
696 -- call BufferIsOpen() method before.
700 aRetainBuffer : Integer;
701 aScaleX : Factor = 1.0;
702 aScaleY : Factor = 1.0
704 ---Purpose: Erase , Scale the buffer from the Pivot point and reDraw ALL primitives
705 -- retains in the buffer <aRetainBuffer>.
706 -- <aScaleX,aScaleY> are the absolute scale factors apply on the two axis.
707 -- Warning: Note that the scalling of some primitives can provided some bad
708 -- smoothing side effect (i.e: Circles,...)
709 raises DriverError from Aspect is virtual;
710 ---Trigger: Raises if the retain buffer is not opened or
711 --one of <aScale> factor is <= 0.
712 -- call BufferIsOpen() method before.
716 aRetainBuffer : Integer;
717 anAngle : PlaneAngle = 0.0
719 ---Purpose: Erase , Rotate the buffer from the Pivot point and reDraw ALL primitives
720 -- retains in the buffer <aRetainBuffer>.
721 -- <anAngle> is the absolute counter-clockwise rotation angle from the
723 raises DriverError from Aspect is virtual;
724 ---Trigger: Raises if the retain buffer is not opened.
725 -- call BufferIsOpen() method before.
728 ----------------------------
729 -- Category: Inquire methods
730 ----------------------------
732 WorkSpace ( me; Width, Heigth : out Length from Quantity ) is virtual;
734 ---Purpose: Returns the Available WorkSpace in DWU coordinates
736 Convert ( me; PV : Integer from Standard )
737 returns Length from Quantity is virtual;
739 ---Purpose: Returns the DWU value depending of
742 Convert ( me; DV : Length from Quantity )
743 returns Integer from Standard is virtual;
745 ---Purpose: Returns the PIXEL value depending of
750 PX, PY : Integer from Standard;
751 DX, DY : out Length from Quantity
755 ---Purpose: Returns the DWU position depending of
756 -- the PIXEL position .
760 DX, DY : Length from Quantity;
761 PX, PY : out Integer from Standard
765 ---Purpose: Returns the PIXEL position depending of
766 -- the DWU position .
768 ProcessColorIndex( me; ColorIndex : Integer) returns Integer from Standard is private;
770 ProcessWidthIndex( me; WidthIndex : Integer) returns Length from Quantity is private;
772 ProcessTypeIndex ( me; TypeIndex : Integer) returns Integer from Standard is private;
774 BufferIsOpen ( me; aRetainBuffer : Integer )
775 returns Boolean is virtual;
776 ---Purpose: Returns TRUE if the retain buffer <aRetainBuffer> is enabled
779 BufferIsEmpty ( me; aRetainBuffer : Integer )
780 returns Boolean is virtual;
781 ---Purpose: Returns TRUE if the retain buffer has not been opened or empty.
782 --- Returns FALSE if a lot of primitives have been stored inside
783 -- because a BeginDraw(..,<aRetainBuffer>) has been done previously.
785 BufferIsDrawn ( me; aRetainBuffer : Integer )
786 returns Boolean is virtual;
787 ---Purpose: Returns TRUE if the retain buffer s actually displayed at screen.
789 AngleOfBuffer ( me; aRetainBuffer : Integer; anAngle: out PlaneAngle )
790 ---Purpose: Returns the current buffer rotate angle from the X axis.
791 raises DriverError from Aspect is virtual;
792 ---Trigger: Raises if the retain buffer is not opened.
793 -- call BufferIsOpen() method before.
795 ScaleOfBuffer ( me; aRetainBuffer : Integer; aScaleX,aScaleY : out Factor )
796 ---Purpose: Returns the current buffer scale factors.
797 raises DriverError from Aspect is virtual;
798 ---Trigger: Raises if the retain buffer is not opened.
799 -- call BufferIsOpen() method before.
803 aRetainBuffer : Integer;
804 aPivotX, aPivotY : out ShortReal
806 ---Purpose: Returns the current buffer position.
807 raises DriverError from Aspect is virtual;
808 ---Trigger: Raises if the retain buffer is not opened.
809 -- call BufferIsOpen() method before.
813 aText : ExtendedString from TCollection;
814 aWidth, aHeight : out ShortReal from Standard;
815 aFontIndex : Integer from Standard = -1
818 ---Purpose: Returns the TEXT size in DWU space depending
819 -- of the required FontIndex if aFontIndex is >= 0
820 -- or the current FontIndex if < 0 (default).
821 -- Trigger: Raises if font is not defined.
822 raises DriverError from Aspect is virtual;
823 ---Category: Inquire methods
827 aText : ExtendedString from TCollection;
828 aWidth, aHeight, anXoffset, anYoffset : out ShortReal from Standard;
829 aFontIndex: Integer from Standard = -1)
831 ---Purpose: Returns the TEXT size and offsets
832 -- in DWU space depending
833 -- of the required FontIndex if aFontIndex is >= 0
834 -- or the current FontIndex if < 0 (default).
835 -- Trigger: Raises if font is not defined.
836 raises DriverError from Aspect is virtual;
837 ---Category: Inquire methods
841 aText : CString from Standard;
843 anXoffset, anYoffset : out ShortReal from Standard;
844 aFontIndex : Integer from Standard = -1
847 ---Purpose: Returns the TEXT size in DWU space depending
848 -- of the required FontIndex if aFontIndex is >= 0
849 -- or the current FontIndex if < 0 (default).
850 -- Trigger: Raises if font is not defined.
851 raises DriverError from Aspect is virtual;
852 ---Category: Inquire methods
856 aSlant : out PlaneAngle from Quantity;
857 aSize,aBheight : out ShortReal from Standard;
858 aFontIndex : Integer from Standard = -1
860 returns CString from Standard
862 ---Purpose: Returns the font string,slant,size and
863 -- baseline height in DWU space depending
864 -- of the required FontIndex if aFontIndex is >= 0
865 -- or the current FontIndex if < 0 (default).
866 -- Trigger: Raises if font is not defined.
867 raises DriverError from Aspect is virtual;
868 ---Category: Inquire methods
870 ColorBoundIndexs(me; aMinIndex,aMaxIndex : out Integer from Standard)
874 -- Returns the min and max driver virtual color indexs.
875 ---Category: Inquire methods
877 LocalColorIndex(me; anIndex : Integer from Standard)
878 returns Integer from Standard is redefined;
881 -- Returns the local colormap hardware index from a virtual driver color
882 -- index or returns -1 if the index is not defined.
883 ---Category: Inquire methods
885 FontBoundIndexs(me; aMinIndex,aMaxIndex : out Integer from Standard)
889 -- Returns the min and max driver virtual font indexs.
890 ---Category: Inquire methods
892 LocalFontIndex(me; anIndex : Integer from Standard)
893 returns Integer from Standard is redefined;
896 -- Returns the associated fontmap hardware index from a virtual driver font
897 -- index or returns -1 if the index is not defined.
898 ---Category: Inquire methods
900 TypeBoundIndexs(me; aMinIndex,aMaxIndex : out Integer from Standard)
904 -- Returns the min and max driver virtual type indexs.
905 ---Category: Inquire methods
907 LocalTypeIndex(me; anIndex : Integer from Standard)
908 returns Integer from Standard is redefined;
911 -- Returns the associated typemap hardware index from a virtual driver type
912 -- index or returns -1 if the index is not defined.
913 ---Category: Inquire methods
915 WidthBoundIndexs(me; aMinIndex,aMaxIndex : out Integer from Standard)
919 -- Returns the min and max driver virtual width indexs.
920 ---Category: Inquire methods
922 LocalWidthIndex(me; anIndex : Integer from Standard)
923 returns Integer from Standard is redefined;
926 -- Returns the associated widthmap hardware index from a virtual driver width
927 -- index or returns -1 if the index is not defined.
928 ---Category: Inquire methods
930 MarkBoundIndexs(me; aMinIndex,aMaxIndex : out Integer from Standard)
934 -- Returns the min and max driver virtual marker indexs.
935 ---Category: Inquire methods
937 LocalMarkIndex(me; anIndex : Integer from Standard)
938 returns Integer from Standard is redefined;
941 -- Returns the local markmap hardware index from a virtual driver marker
942 -- index or returns -1 if the index is not defined.
943 ---Category: Inquire methods
945 TextManager (me: mutable)
946 returns TextManager from WNT;
947 ---C++: return const &
948 ---Category: Inquire methods
950 MFT_Font (me: mutable; anIndex: Integer)
951 returns FontManager from MFT;
952 ---C++: return const &
953 ---Category: Inquire methods
955 MFT_Size (me: mutable; anIndex: Integer)
957 ---Category: Inquire methods
962 myAllocator : Address from Standard;
963 myWNTWindow : Window from WNT;
964 myPixelToUnit : Real from Standard;
966 myColors : HColorTable from WNT;
967 myFonts : HFontTable from WNT;
968 myTypeIdxs : HArray1OfInteger from TColStd;
969 myWidthIdxs : HArray1OfInteger from TColStd;
970 myMarkerIdxs : HArray1OfInteger from TColStd;
972 myMFTFonts : HListOfMFTFonts from WNT;
973 myMFTSizes : HArray1OfShortReal from TShort;
974 myTextManager : TextManager from WNT;