Description


Include file: xgraphdv.h

Overview

XGraphicDevice is a context in which graphic object can be created and drawn. There are two methods to use XGraphicDevice

  1. Using one graphic device

    The most simple way is to use one graphic device in this case you only need to create the objects to draw in this device, every time it has to be redrawn (when the method Draw() of the owning window is called) you call the method Draw() of the device.

  2. Using two graphic devices

    If you have a litle bit more objects you should use this method because it works faster. Create one device in memory (the second parameter of the constructor must be TRUE) and create the objects to draw on this device. Only call Draw() if you have inserted/removed one or more objcts. Create a second graphic device associated to the owning window. If the method Draw() of the owning window is called, copy the content of the memory-device to the window-associated device with Copy().

You can draw on a XGraphicDevice (and derived classes) with following classes:

Functions

Draw

Remarks

Draw the contents.

SetBackgroundColor

Parameters

XColor * color color to fill the background with

Remarks

Set the background color (only used if fillBackgound is set TRUE in the constructor)

XGraphicDevice

Parameters

XWindow * window window to draw to (if XGraphicDevice is not constructed in memory)
BOOL memory construct in memory (default is FALSE)
BOOL fillBackground fill the background
LONG mode mode, possible values:
XGRAPH_PELS
XGRAPH_LOMETRIC
XGRAPH_HIMETRIC
XGRAPH_LOENGLISH
XGRAPH_HIENGLISH
XGRAPH_TWIPS

Remarks

Constructs a grphic device where objects like XLine, XText etc can be drawn

Copy

Parameters

XGraphicDevice * source the source from which to copy
XRect * targetRect rectangle which defines the target
XRect * sourceRect rectangle which defines the source (default is NULL). If the width of the rect is set greater zero, the content will be stretched

Remarks

Copy the content of one graphic to another


This document was generated by Jens von Pilgrim's Autodoc