VCOM:VectorWorks:IDrawPad

From Vectorworks Developer
Jump to: navigation, search

.SDK|SDK ..SDK:Types|SDK Types ..VCOM:VCOM (Vectorworks Component Object Model)|VCOM Basics ..VCOM:Class Reference|VCOM Class Reference

Description

namespace VectorWorks::UI

Provides extended drawing capabilities of the custom control in the SDK:Layout Manager.

See VWCustomCtrl class in VWUI namespace of VWFC.

Interface

// ----------------------------------------------------------------------------------------------------
// {6eef7e80-90f8-11db-b606-0800200c9a66}
static const VWIID IID_DrawPad = { 0x6eef7e80, 0x90f8, 0x11db, { 0xb6, 0x06, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 } };
	
class IDrawPad : public IVWUnknown
{
public:
  virtual VCOMError VCOM_CALLTYPE InitializeInDevice(unsigned long deviceHandle, void* devDC) = 0;
  virtual VCOMError VCOM_CALLTYPE InitializeInMemory(const ViewRect& rect) = 0;
  virtual VCOMError VCOM_CALLTYPE SetCanvasColor(const GSColor& color) = 0;
  virtual VCOMError VCOM_CALLTYPE SetPen(Sint16 inPenSize,
                                         const GSColor& inForeColor,
                                         const GSColor& inBackColor,
                                         Sint16 inStyle, 
                                         Sint16 inUnscaledPenSize = -1) = 0;
						
  virtual VCOMError VCOM_CALLTYPE FillRect(const ViewRect& rect) = 0;
  virtual VCOMError VCOM_CALLTYPE FrameRect(const ViewRect& rect) = 0;

  virtual VCOMError VCOM_CALLTYPE SetClipRect(const ViewRect& rect) = 0;
  virtual VCOMError VCOM_CALLTYPE SetPenFgColor(const GSColor& inColor) = 0;
  virtual VCOMError VCOM_CALLTYPE GetTextWidth(const TXString& string, Uint32& outWidth) = 0;
  virtual VCOMError VCOM_CALLTYPE TextMoveTo(Sint16 x, Sint16 y) = 0;
  virtual VCOMError VCOM_CALLTYPE DrawTextString(const TXString& string) = 0; 
  virtual VCOMError VCOM_CALLTYPE DPMoveTo(Sint16 x, Sint16 y) = 0;
  virtual VCOMError VCOM_CALLTYPE DPLineTo(Sint16 x, Sint16 y) = 0;
  virtual VCOMError VCOM_CALLTYPE GetCharacterWidth(const char ch, Uint32& outWidt) = 0;
  virtual VCOMError VCOM_CALLTYPE CopyBitsOut(const GSRect32& srcRect,
                                              IDrawPad* pDestDrawPad,
                                              const GSRect32& destRect,
                                              EDrawPadTransferMode mode) = 0;
  virtual VCOMError VCOM_CALLTYPE DrawDashedLine(const ViewPt& m1,
                                                 const ViewPt& m2,
                                                 short lineStyle,
                                                 short thickness) = 0;

  virtual VCOMError VCOM_CALLTYPE CreatePoly(GSPolyRef& outPolyRef) = 0;
  virtual VCOMError VCOM_CALLTYPE AddPolyPt(const GSPolyRef& inPolyRef, const ViewPt& inPt) = 0;
  virtual VCOMError VCOM_CALLTYPE ReleasePoly(const GSPolyRef& inPolyRef) = 0;
  virtual VCOMError VCOM_CALLTYPE FillPoly(const GSPolyRef& inPolyRef) = 0;
  virtual VCOMError VCOM_CALLTYPE CaptureDevice() = 0;
  virtual VCOMError VCOM_CALLTYPE ReleaseDevice() = 0;

  virtual VCOMError VCOM_CALLTYPE SetTextFont(const DPFont& font) = 0;
  virtual VCOMError VCOM_CALLTYPE SetTextAngle(double textAngle, bool baselineMirror) = 0;
  virtual VCOMError VCOM_CALLTYPE GetTextFont(DPFont& outFont) = 0;
  virtual VCOMError VCOM_CALLTYPE GetTextAngle(double& outTextAngle, bool& outBaselineMirror) = 0;

  virtual VCOMError VCOM_CALLTYPE GetOSDeviceContext(Uint32& outDevice) = 0;

  virtual VCOMError VCOM_CALLTYPE GetTextWidthN(ConstUCStrPtr uniString, Uint32& outWidth) = 0;
  virtual VCOMError VCOM_CALLTYPE DrawTextStringN(ConstUCStrPtr uniString) = 0; 
};

Members

InitializeInDevice
InitializeInMemory
SetCanvasColor
SetPen
FillRect
FrameRect
SetClipRect
SetPenFgColor
GetTextWidth
TextMoveTo
DrawTextString
DPMoveTo
DPLineTo
GetCharacterWidth
CopyBitsOut
DrawDashedLine
CreatePoly
AddPolyPt
ReleasePoly
FillPoly
CaptureDevice
ReleaseDevice
SetTextFont
SetTextAngle
GetTextFont
GetTextAngle
GetOSDeviceContext
GetTextWidthN
DrawTextStringN

Remarks

There is predefined type for smart VCOM pointer VCOMPtr to IDrawPad interface:
typedef VCOMPtr<IDrawPad>  IDrawPadPtr;
enum EDrawPadTransferMode {
  eDrawPadTransferMode_Copy                             = 0,
  eDrawPadTransferMode_Or                               = 1,
  eDrawPadTransferMode_Xor                              = 2,
  eDrawPadTransferMode_Erase                            = 3,
  eDrawPadTransferMode_NotCopy                          = 4,
  eDrawPadTransferMode_NotOr                            = 5,
  eDrawPadTransferMode_NotXor                           = 6,
  eDrawPadTransferMode_NotErase                         = 7,
  eDrawPadTransferMode_WhiteIsTransparent               = 8,
  eDrawPadTransferMode_kAlphaTransparency               = 9,
  eDrawPadTransferMode_kPremultipliedAlphaTransparency	= 10
};

Version

Available from: VectorWorks 12

See Also

VCOM:VCOMPtr
[[VCOM:VCOMPtr]]
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox