InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDVPlatformOffscreen Class Referenceabstract

#include <IDVPlatformOffscreen.h>

Inheritance diagram for IDVPlatformOffscreen:
grRefCountedObj

Public Member Functions

virtual dvaui::drawbot::Drawbot * GetOffscreenDrawbot () const =0
 
virtual void GetOrigin (int32 *x, int32 *y) const =0
 
virtual void SetOrigin (int32 x, int32 y)=0
 
virtual void CopyBitsFromOffscreen (dvaui::drawbot::Drawbot *dstDrawbot, const Int32Rect &srcBounds, const Int32Rect &dstBounds, const PMMatrix &clip2destMatrix=PMMatrix(), const SysRgn clipRgn=nil, int debug_cookie=0, const char *debug_string=0, void *debug_address=0)=0
 
virtual void CopyBitsFromOffscreen (IDVPlatformOffscreen *dstDVPlatformOffscreen, const Int32Rect &srcBounds, const Int32Rect &dstBounds, const PMMatrix &clip2destMatrix=PMMatrix(), const SysRgn clipRgn=nil, int debug_cookie=0, const char *debug_string=0, void *debug_address=0)=0
 
virtual const Int32RectGetBounds ()=0
 
virtual void GetPlatformBitmapInfo (void **baseAddr, uint32 *rowBytes, Int32Rect *portRect, uint32 *bitsPerPixel=nil)=0
 
virtual int32 OffscreenError ()=0
 
virtual bool16 UpdateBitmap (const Int32Rect &bounds, PMReal uiScaleFactor=1.0)=0
 
virtual bool16 UpdateBitmapIfDifferent (const Int32Rect &bounds, PMReal uiScaleFactor=1.0)=0
 
virtual PMReal GetCurrentUIScaleFactorReal ()=0
 
virtual void CopyBitsFromOffscreen (dvaui::drawbot::Drawbot *dstDrawbot, const Int32Rect &srcBounds, const PMRect &dstBounds, const PMMatrix &clip2destMatrix, const dvaui::drawbot::PathP path, int debug_cookie=0, const char *debug_string=0, void *debug_address=0)=0
 
- Public Member Functions inherited from grRefCountedObj
 grRefCountedObj ()
 
virtual ~grRefCountedObj ()=0
 
virtual void AddRef () const
 
virtual void Release () const
 

Additional Inherited Members

- Protected Attributes inherited from grRefCountedObj
int32 fRefCount
 

Detailed Description

IDVPlatformOffscreen is a wrapper around a Drover based bitmap. This interface is implemented in DVPlatformOffscreen, which helps in creation of Drover based offscreen DRawbot object, so that all drawing happens offscreen. This infetrface provides functions to copy bitmap bits to/from onscreen drawbot object.

This inteface cannot be added to boss, instead its implementation DVPlatformOffscreen is used from DVOffscreenPortData.

See Also
IDVOffscreenViewPortCache, IDVOffscreenPortData

Member Function Documentation

virtual void IDVPlatformOffscreen::CopyBitsFromOffscreen (dvaui::drawbot::Drawbot * dstDrawbot,
const Int32RectsrcBounds,
const Int32RectdstBounds,
const PMMatrixclip2destMatrix = PMMatrix(),
const SysRgn clipRgn = nil,
int debug_cookie = 0,
const char * debug_string = 0,
void * debug_address = 0 
)
pure virtual
   Copy pixels from srcPort into the offscreen represented by this class. 

Parameters
&srcDrawbot- IN: Pointer to the source drawbot.
&srcBounds- IN - the area of the port/window to copy
&dstBounds- IN - the area of the offscreen to copy into
clipRgn- IN - the area of the port/window to restrict the copy operation to. Copy pixels from this offscreen into the provided port.
&dstPort- IN - Pointer to the destination drawbot
&srcBounds- IN - the area of the offscreen to copy
&dstBounds- IN - the area of the window to copy into
clipRgn- IN - the area of the offscreen to copy
virtual void IDVPlatformOffscreen::CopyBitsFromOffscreen (IDVPlatformOffscreendstDVPlatformOffscreen,
const Int32RectsrcBounds,
const Int32RectdstBounds,
const PMMatrixclip2destMatrix = PMMatrix(),
const SysRgn clipRgn = nil,
int debug_cookie = 0,
const char * debug_string = 0,
void * debug_address = 0 
)
pure virtual
   Copy pixels from the provided offscreen into this offscreen. 

Parameters
srcPort- IN - the source offscreen
&srcBounds- IN - the area of the offscreen to copy
&dstBounds- IN - the area of this offscreen (the destination) to copy into
clipRgn- IN - the area of the offscreen to copy Copy pixels from this offscreen into the provided offscreen.
dstPort- IN - the destination offscreen
&srcBounds- IN - the area of this offscreen (the source) to copy
&dstBounds- IN - the area of the provided offscreen (the destination) to copy into
clipRgn- IN - the area of the offscreen to copy
virtual void IDVPlatformOffscreen::CopyBitsFromOffscreen (dvaui::drawbot::Drawbot * dstDrawbot,
const Int32RectsrcBounds,
const PMRectdstBounds,
const PMMatrixclip2destMatrix,
const dvaui::drawbot::PathP path,
int debug_cookie = 0,
const char * debug_string = 0,
void * debug_address = 0 
)
pure virtual
   Copy pixels from this offscreen into the provided offscreen. 

Parameters
dstDrawbot- IN - the destination offscreen
&srcBounds- IN - the area of this offscreen (the source) to copy
&dstBounds- IN - the area of the provided offscreen (the destination) to copy into
clip2destMatrix-IN - clip to destination space matrix
path- IN - the area of the offscreen to copy
virtual const Int32Rect& IDVPlatformOffscreen::GetBounds ()
pure virtual
   Returns the bounds of this offscreen 

Returns
Current bounds of the offscreen.
virtual PMReal IDVPlatformOffscreen::GetCurrentUIScaleFactorReal ()
pure virtual
   Returns the scaling factor (real) for the offscreen.

Returns
The scaling factor, currently 1 or 2 for the Mac, or a real number 1.0 to 5.0 for Win.
virtual dvaui::drawbot::Drawbot* IDVPlatformOffscreen::GetOffscreenDrawbot () const
pure virtual

Returns the underlying drawbot object

virtual void IDVPlatformOffscreen::GetOrigin (int32 * x,
int32 * y 
) const
pure virtual
   Get the current origin of the bitmap 

Parameters
x- OUT: Horizontal coordinate of the origin.
y- OUT: Vertical coordinate of the origin.
virtual void IDVPlatformOffscreen::GetPlatformBitmapInfo (void ** baseAddr,
uint32 * rowBytes,
Int32RectportRect,
uint32 * bitsPerPixel = nil 
)
pure virtual
   Returns information about this offscreen 

Parameters
baseAddr- OUT - a pointer to the underlying offscreen pixel data
rowBytes- OUT - the number of bytes per scanline of data
portRect- OUT - the bounds of this offscreen
bitsPerPixel- OUT - the number of bits per pixel
virtual int32 IDVPlatformOffscreen::OffscreenError ()
pure virtual
   Returns any error which might have occured during drawing. 

Returns
The current platform specific error or 0 if no error.
virtual void IDVPlatformOffscreen::SetOrigin (int32 x,
int32 y 
)
pure virtual
   Set the origin to originPt 

Parameters
x- IN: New horizontal coordinate to use for the origin.
y- IN: New vertical coordinate to use for the origin.
virtual bool16 IDVPlatformOffscreen::UpdateBitmap (const Int32Rectbounds,
PMReal uiScaleFactor = 1.0 
)
pure virtual
  Makes sure that it has an underlying bitmap that is at least as big 

as the provided bounds rect. If there is already an underlying bitmap which is at least as large as the bounds, and the origin has not changed, then nothing happens. Otherwise, the old bitmap is disposed and a new one is allocated using the provided bounds.

Parameters
bounds- IN: The new bounds for the underlying bitmap.
Returns
If UpdateBitmap returns kTrue then the underlying bitmap has been changed.
virtual bool16 IDVPlatformOffscreen::UpdateBitmapIfDifferent (const Int32Rectbounds,
PMReal uiScaleFactor = 1.0 
)
pure virtual
   Same as UpdateBitmap except that the old bitmap can be disposed of if it is much 

larger than the new bounds.

Parameters
bounds- IN: The new bounds for the underlying bitmap.
Returns
If UpdateBitmapIfDifferent returns kTrue then the underlying bitmap has been changed.