class PDrawCanvas: public PInteractorCanvas

A canvas that is attached to an interactor on the screen and may be drawn into at any time.

Inheritance:


Public Methods

[more] PDrawCanvas ( PInteractor * theInteractor, BOOL inPixels = FALSE, BOOL overDrawChildWindows = FALSE )
Create a canvas associated with an interactor on the screen.
[more]virtual ~PDrawCanvas ()
Destroy the canvas and its resources.


Inherited from PInteractorCanvas:

Public Methods

ovirtual PRect GetDrawingBounds() const
oPInteractor* GetInteractor() const
ovoid Scroll( const PPoint & amt )
ovoid Copy( const PRect & srcRect, PCanvas & dst, const PPoint & pt )

Public

Overrides from class PCanvas

New functions for class

Protected Fields

oPInteractor* interactor


Inherited from PCanvas:

Public Classes

oenum DrawStringOptions

Public Methods

ovirtual Comparison Compare( const PObject & obj ) const
ovirtual PCanvasState& operator=( const PCanvasState & state )
oconst PRealFont& GetFont() const
ovirtual PFontFamilyList GetAvailableFonts() const
ovirtual void Save()
ovirtual void Restore()
ovirtual void SetCurrentPosition( PORDINATE x, PORDINATE y )
ovirtual void MoveCurrentPosition( PORDINATE x, PORDINATE y )
ovirtual void MoveCurrentPosition( const PPoint & pos )
ovirtual PPoint GetCurrentPosition() const
ovirtual void DrawLine( PORDINATE x, PORDINATE y )
ovirtual void DrawLine( const PPoint & pt )
ovirtual void DrawLineRelative( PORDINATE x, PORDINATE y )
ovirtual void DrawLine( PORDINATE x1, PORDINATE y1, PORDINATE x2, PORDINATE y2 )
ovoid DrawRect( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height )
ovoid FillRect( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height )
ovirtual void DrawFocusRect( const PRect & rect )
ovirtual void DrawBevelledRect( const PRect & rect, BOOL raised, BOOL deep )
ovirtual void DrawRoundRect( const PRect & rect, PDIMENSION cornerWidth, PDIMENSION cornerHeight )
ovirtual void DrawEllipse( const PRect & rect )
ovirtual void DrawArc( const PRect & rect, int startAngle, int endAngle )
ovirtual void DrawPie( const PRect & rect, int startAngle, int endAngle )
ovirtual void DrawChord( const PRect & rect, int startAngle, int endAngle )
ovirtual void DrawPolyLine( const PPointArray & ptArray )
ovirtual void DrawPolygon( const PPointArray & ptArray )
ovirtual void DrawImgIcon( PORDINATE x, PORDINATE y, const PImgIcon & icn )
ovirtual void DrawIcon( PORDINATE x, PORDINATE y, const PIcon & icn )
ovirtual void DrawPixels( PORDINATE x, PORDINATE y, const PPixelImage & pix )
ovirtual void DrawPixels( const PRect & rect, const PPixelImage & pix )
ovirtual void DrawPict( PORDINATE x, PORDINATE y, const PPictImage & pic )
ovirtual void DrawPict( const PRect & rect, const PPictImage & pic )
ovirtual void DrawString( PORDINATE x, PORDINATE y, const PString & str, int options = LeftAlign )
ovirtual PDIMENSION DrawString( const PRect & rect, const PString & str, int options = LeftAlign )
ovirtual PDim MeasureString( const PString & str )
ovirtual PDIMENSION MeasureString(const PString & str, PDIMENSION width)
ovirtual void DrawTextLine( PORDINATE x, PORDINATE y, const char * textChars, const PDIMENSION * charWidths, PINDEX len )
ovirtual PRect GetPhysicalBounds(BOOL inPixels = FALSE) const
ovirtual void SetClipRegion( const PRegion & rgn )
ovirtual PRegion GetClipRegion() const
ovirtual void SetClipRect( const PRect & rect )
ovirtual PRect GetClipRect() const
oBOOL IsInClipRegion( const PPoint & pt ) const
oPDIMENSION FromPixelsDX( PDIMENSION dx ) const
oPDIMENSION ToPixelsDX( PDIMENSION dx ) const
oPDIMENSION FromPointsX( PDIMENSION dx )
oPDIMENSION ToPointsX( PDIMENSION dx )

Protected Classes

oclass State: public PObject, public PCanvasState

Protected Fields

oPRealFont realFont

Protected Methods

ovirtual void _DrawRect( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height )
ovirtual void _FillRect( PORDINATE x, PORDINATE y, PDIMENSION width, PDIMENSION height )

Protected

PORDINATE Member variables


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions

Miscellaneous functions


Inherited from PCanvasState:

Public Classes

oenum PenStyles
oenum DrawingModes
oenum PolyFillMode

Public Methods

ovirtual BOOL SetPenStyle( PenStyles style )
oPenStyles GetPenStyle() const
ovirtual BOOL SetPenWidth( int width )
oint GetPenWidth() const
ovirtual BOOL SetPenMode( DrawingModes mode )
oDrawingModes GetPenMode() const
ovirtual BOOL SetPenFgColour( const PColour & colour )
oconst PColour& GetPenFgColour() const
ovirtual BOOL SetPenBkColour( const PColour & colour )
oconst PColour& GetPenBkColour() const
ovirtual BOOL SetFillPattern( const PPattern & pattern )
oPPattern GetFillPattern() const
ovirtual BOOL SetPatternOrigin( const PPoint & pt )
oPPoint GetPatternOrigin() const
ovirtual BOOL SetFillMode(DrawingModes style)
oDrawingModes GetFillMode() const
ovirtual BOOL SetFillFgColour( const PColour & colour )
oconst PColour& GetFillFgColour() const
ovirtual BOOL SetFillBkColour( const PColour & colour )
oconst PColour& GetFillBkColour() const
ovirtual BOOL SetFont(const PFont & newFont)
ovirtual BOOL SetTextFgColour( const PColour & colour )
oconst PColour& GetTextFgColour() const
ovirtual BOOL SetTextBkColour( const PColour & colour )
oconst PColour& GetTextBkColour() const
ovirtual BOOL SetPolyFillMode( PolyFillMode newMode )
oPolyFillMode GetPolyFillMode() const
ovirtual BOOL SetPalette( const PPalette & newPal )
oPPalette GetPalette() const
ovirtual BOOL SetMappingRect( const PRect & rect )
oPRect GetMappingRect() const
ovirtual BOOL SetViewportRect( const PRect & rect )
oPRect GetViewportRect() const
ovoid SetOrigin(const PPoint & pt)
oPPoint GetOrigin() const


Documentation

A canvas that is attached to an interactor on the screen and may be drawn into at any time. Unlike a PRedrawCanvas which the user should never directly create, the PDrawCanvas is spcifically for application driven drawing of the screen.

NOTE *********************************** On Some platforms, canvases are a limited resource. Do NOT create and leave them around for long periods. As soon as it is not required till the next user event, destroy it!

o PDrawCanvas( PInteractor * theInteractor, BOOL inPixels = FALSE, BOOL overDrawChildWindows = FALSE )
Create a canvas associated with an interactor on the screen.
Parameters:
theInteractor - Interactor canvas is attached to.
inPixels - Set the initial canvas coordinates are in screen pixels. The default is for the coordinates to be set to one based on the current font for the interactor (1/4 the average character widthand 1/8 the height).
overDrawChildWindows - Drawing operations may overwrite child interactors that the attached interactor may have conatined within it. The default is for the drawing clip region to be set so that drawing does not overwrite child interactors.

ovirtual ~PDrawCanvas()
Destroy the canvas and its resources.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.