#include <GDrawIntf.h>
Inheritance diagram for GDrawAsm:
Public Member Functions | |
GDrawAsm () | |
GDrawAsm (DWORD ThreadID) | |
~GDrawAsm () | |
Destructor - performs required tidy up. | |
virtual BOOL | Init () |
Can the this pointer be used to render things. | |
virtual BOOL | Init (GDrawAsm *pSource) |
virtual eError | GetLastError () |
virtual INT32 | GetGraduationTableSize () |
virtual INT32 | GetGraduationTableLength () |
virtual INT32 | GetLongGraduationTableSize () |
virtual INT32 | GetLongGraduationTableLength () |
virtual INT32 | GetTransparentGraduationTableSize () |
virtual INT32 | GetTransparentGraduationTableLength () |
virtual INT32 | GetLongTransparentGraduationTableSize () |
virtual INT32 | GetLongTransparentGraduationTableLength () |
virtual void | SetStackLimit (LPVOID) |
Stops bad paths form using all stack space up. | |
virtual void | SetStackSize (DWORD) |
Stops bad paths form using all stack space up. | |
virtual BOOL | SetupBitmap (INT32 Width, INT32 Height, INT32 Depth, LPBYTE Bits, DWORD Format, BOOL DoBiCompression=FALSE) |
This is the bitmap that will be drawn into with rendering calls. | |
virtual BOOL | SetBitmap (CONST LPBITMAPINFOHEADER BitmapInfo, CONST LPBYTE Bitmap, DWORD BitmapFormat=2) |
virtual BOOL | SetMatrix (GMATRIX *) |
Sets the matrix to be used during rendering. | |
virtual void | SetAntialiasFlag (BOOL) |
Sets the matrix to be used during rendering. | |
virtual void | SetAntialiasQualityFlag (BOOL) |
virtual void | SetTileSmoothingFlag (BOOL) |
Sets smoother rendering of Bitmap Plotting, but does not work with perspectivised! | |
virtual void | SetTileFilteringFlag (BOOL) |
Sets smoothest rendering of bitmaps - rotation & scaling. | |
virtual void | SetMaxFilterSize (UINT32) |
virtual BOOL | Sharpen (INT32) |
virtual BOOL | Blur (INT32) |
virtual void | SetHintingFlag (BOOL) |
Sets the flag in GDraw which forces all exactly horizontal and vertical line segments to be hinted onto pixel centres. | |
virtual void | SetFlatness (DWORD) |
Sets the flattening. | |
virtual void | TransformPath (LPPOINT, LPPOINT, DWORD, GMATRIX *) |
Convert any number of points using a GMatrix. | |
virtual INT32 | MaxScale (CONST GMATRIX *Matrix, CONST RECT *BBox) |
This returns a scale factor that should be safe to use for a drawing of the size of the given bounding box. Currently only the translation values of the matrix are used. To convert this maximum scale factor to a zoom value, divide by the scale factor required for 100% zoom. | |
virtual void | SetHalftoneOrigin (DWORD, DWORD) |
Sets the origin of the dither patterns. | |
virtual BOOL | SetDitherStyle (DitherStyle Style=DITHER_GREY_ORDERED) |
Sets the style of the dither patterns. | |
virtual BOOL | AddToGraduationTable (COLORREF, BOOL, GraduationTable *, DWORD) |
Adds a colour to a grad table at the specified point. | |
virtual BOOL | BuildGraduationTable (COLORREF, COLORREF, DWORD, GraduationTable *) |
Gets table ready for grad fills. | |
virtual BOOL | BuildTransparencyTable (DWORD, DWORD, TransparentGradTable *) |
Gets table ready for transparent grad fills. | |
virtual BOOL | SetColour (COLORREF) |
Sets drawing colour to be used in subsequent rendering. | |
virtual BOOL | SetSolidColour (COLORREF, DWORD, DWORD) |
Sets drawing colour to be used in subsequent rendering. | |
virtual BOOL | SetWordColour (DWORD) |
Sets drawing colour to be used in subsequent rendering. | |
virtual BOOL | SetTransparency (COLORREF, TransparencyEnum) |
Sets drawing colour to be used in subsequent rendering with transparency. Only has effect if output device can do transparency, else falls into SetColour. | |
virtual BOOL | ConvertBitmap (LPBITMAPINFOHEADER, LPBYTE, LPBITMAPINFOHEADER, LPBYTE, INT32) |
Converts bitmaps from one format to another. Currently supported modes are: 16->8 and 32->8. | |
virtual pcLOGPALETTE | SelectPalette (INT32) |
Returns a 256 colour logical palette that should be used in 8-bit modes. | |
virtual BOOL | SetGraduation (DWORD Style, CONST GraduationTable *Table, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointC) |
Reads the currently selected palette and builds internal tables based upon the results. Should be called after a palette change. Note that this may take a few seconds to execute and should be called sparingly. | |
virtual BOOL | SetTransparentGraduation (DWORD Style, CONST TranspGradTable *Table, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointC) |
Reads the currently selected palette and builds internal tables based upon the results. Should be called after a palette change. Note that this may take a few seconds to execute and should be called sparingly. | |
virtual BOOL | SetGraduation4 (DWORD Style, CONST GraduationTable *Table, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointC, CONST POINT *PointD) |
Reads the currently selected palette and builds internal tables based upon the results. Should be called after a palette change. Note that this may take a few seconds to execute and should be called sparingly. | |
virtual BOOL | SetTransparentGraduation4 (DWORD Style, CONST TranspGradTable *Table, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointC, CONST POINT *PointD) |
Reads the currently selected palette and builds internal tables based upon the results. Should be called after a palette change. Note that this may take a few seconds to execute and should be called sparingly. | |
virtual BOOL | SetBias (UINT32, double) |
virtual BOOL | SetGain (UINT32, double) |
virtual BOOL | SetBrightness (double) |
virtual BOOL | SetContrast (double) |
virtual BOOL | SetGamma (double) |
virtual BOOL | SetPostGamma (double) |
virtual BOOL | SetSaturation (double) |
virtual BOOL | SetContone (UINT32, COLORREF, COLORREF) |
virtual BOOL | SetInputRange (UINT32, BYTE, BYTE) |
virtual BOOL | SetOutputRange (UINT32, BYTE, BYTE) |
virtual BOOL | SetBitmapFill (LPBITMAPINFOHEADER, LPBYTE, DWORD, LPPOINT, COLORREF, LPRGBQUAD, LPBYTE, LPBYTE, LPBYTE, LPBYTE, DWORD) |
virtual BOOL | SetTransparentBitmapFill (LPBITMAPINFOHEADER, LPBYTE, DWORD, LPPOINT, COLORREF, BYTE *, DWORD) |
virtual BOOL | SetPerspectiveBitmapFill (LPBITMAPINFOHEADER, LPBYTE, DWORD, LPPOINT, COLORREF, LPRGBQUAD, LPBYTE, LPBYTE, LPBYTE, LPBYTE, DWORD) |
virtual BOOL | SetPerspectiveTransparentBitmapFill (LPBITMAPINFOHEADER, LPBYTE, DWORD, LPPOINT, COLORREF, BYTE *, DWORD) |
virtual BOOL | SetTransparencyLookupTable (CONST BYTE *Table) |
Sets the table for type 12 transparency. | |
virtual BOOL | StrokePath (LPPOINT, const BYTE *, UINT32, BOOL, DWORD, CapStyles, JoinStyles, const DashType *) |
virtual BOOL | FillPath (LPPOINT, const BYTE *, UINT32, DWORD) |
Fills the path using the current fill style. | |
virtual BOOL | FillRectangle (LPRECT) |
Fills the rectangle with the current fill style. | |
virtual BOOL | FillPoint (LPPOINT) |
Sets one device pixel to the curent fill colour. | |
virtual INT32 | StrokePathToPath (CONST POINT *IPoints, CONST BYTE *ITypes, DWORD ILength, POINT *OPoints, BYTE *OTypes, DWORD OLength, BOOL Close, DWORD LineWidth, CapStyles LineCaps, JoinStyles LineJoin, CONST DashType *Dash) |
Converts a path into another path by sort-of stroking in toto another data structure. | |
virtual BOOL | GetStatistics (LPPOINT, const BYTE *, UINT32, DWORD, STATISTICS *) |
Fills the path counting various things about it. | |
virtual BOOL | ClipRectangle (LPRECT) |
Sets clip rectangle of subsequent rendering. | |
virtual void | ClearChangedBBox () |
Resets 'changed' rectangle. Should be called before anything is drawn, then drawn areas will be accumulated into the BBox. | |
virtual BOOL | GetChangedBBox (LPRECT) |
Gets size of 'changed' rectangle where pixels have been plotted. | |
virtual BOOL | SetChangedBBox (LPRECT) |
Sets size of 'changed' rectangle where pixels have been plotted. | |
virtual COLORREF | ConvertHSVtoRGB (COLORREF) |
virtual COLORREF | ConvertRGBtoHSV (COLORREF) |
virtual DWORD | GetMaxBitmapWidth (void) |
virtual DWORD | GetMaxBitmapDepth (void) |
virtual BOOL | Set3WayGraduation (DWORD Style, COLORREF ColourA, COLORREF ColourB, COLORREF ColourD, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointD) |
virtual BOOL | Set3WayGraduation4 (DWORD Style, COLORREF ColourA, COLORREF ColourB, COLORREF ColourD, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointC, CONST POINT *PointD) |
virtual BOOL | Set4WayGraduation (DWORD Style, COLORREF ColourA, COLORREF ColourB, COLORREF ColourC, COLORREF ColourD, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointD) |
virtual BOOL | Set4WayGraduation4 (DWORD Style, COLORREF ColourA, COLORREF ColourB, COLORREF ColourC, COLORREF ColourD, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointC, CONST POINT *PointD) |
virtual BOOL | SetTransparent3WayGraduation (DWORD Style, BYTE ValueA, BYTE ValueB, BYTE ValueD, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointD) |
virtual BOOL | SetTransparent3WayGraduation4 (DWORD Style, BYTE ValueA, BYTE ValueB, BYTE ValueD, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointC, CONST POINT *PointD) |
virtual BOOL | SetTransparent4WayGraduation (DWORD Style, BYTE ValueA, BYTE ValueB, BYTE ValueC, BYTE ValueD, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointD) |
virtual BOOL | SetTransparent4WayGraduation4 (DWORD Style, BYTE ValueA, BYTE ValueB, BYTE ValueC, BYTE ValueD, CONST POINT *PointA, CONST POINT *PointB, CONST POINT *PointC, CONST POINT *PointD) |
virtual BOOL | SaveContext (GCONTEXT *Context) |
Saves the GDraw context. | |
virtual BOOL | RestoreContext (CONST GCONTEXT *Context) |
Restores the GDraw context. | |
virtual BOOL | SetConversionPalette (PLOGPALETTE) |
Sets the Palette that is to be used for ConvertBitmap. | |
virtual BOOL | SetMiterLimit (DWORD) |
virtual BOOL | SetMatrixIntFlag (BOOL) |
virtual BOOL | SetDashAdjustmentFlag (BOOL) |
virtual BOOL | SetInvert (DWORD) |
virtual BOOL | InitialiseWithPalette (const LOGPALETTE *) |
virtual const BYTE * | ReturnBrush () |
virtual const BYTE * | ReturnBrushRGB () |
virtual BOOL | SetSeparationTables (const BGR *CyanSepTable=NULL, const BGR *MagentaSepTable=NULL, const BGR *YellowSepTable=NULL, const BGR *BlackSepTable=NULL, const BYTE *UnderColourRemovalTable=NULL, const BYTE *BlackGenerationTable=NULL) |
Sets process colour separation tables to be used in the future by various GDraw calls. See the GDraw documentation for details. | |
virtual BOOL | SetBitmapConversionTable (const BGR *BitmapConversionTable=NULL) |
This function will set up the bitmap conversion table for use by the following plotting functions:. | |
virtual BOOL | PlotBitmap (LPBITMAPINFOHEADER, LPBYTE, DWORD, LPPOINT, LPRGBQUAD, LPBYTE, LPBYTE, LPBYTE, LPBYTE) |
virtual BOOL | PlotPerspectiveBitmap (LPBITMAPINFOHEADER, LPBYTE, DWORD, LPPOINT, LPRGBQUAD, LPBYTE, LPBYTE, LPBYTE, LPBYTE) |
virtual INT32 | CalcStrokeBBox (CONST POINT *IPoints, CONST BYTE *ITypes, DWORD ILength, LPRECT Rect, BOOL Close, DWORD LineWidth, CapStyles LineCaps, JoinStyles LineJoin, CONST DashType *Dash) |
virtual BOOL | IsOverlap (LPPOINT, const BYTE *, UINT32, DWORD) |
virtual BOOL | CalcBBox (LPPOINT, const BYTE *, DWORD, LPRECT, BOOL) |
virtual INT32 | MakeRegion (LPPOINT, const BYTE *, UINT32, DWORD, REGION *, UINT32) |
virtual BOOL | DeviceClipRectangle (LPRECT) |
virtual BOOL | GetDeviceClipRectangle (LPRECT) |
virtual BOOL | ClipRegion (const REGION *) |
virtual const REGION * | GetClipRegion () |
virtual BOOL | HintPath (CONST POINT *Points, CONST BYTE *Types, UINT32 Length, BOOL Close, DWORD LineWidth) |
virtual INT32 | MakeUnclippedRegion (CONST POINT *Points, CONST BYTE *Types, UINT32 Length, DWORD Winding, REGION *ORegion, UINT32 OLength) |
virtual BOOL | FillRegion (CONST REGION *Region, CONST POINT *Offset) |
virtual INT32 | SetBevelContrast (UINT32 nContrast) |
virtual INT32 | SetBevelLightness (UINT32 nContrast) |
virtual INT32 | SetBevelDarkness (UINT32 nContrast) |
virtual INT32 | TranslateBevelValue (BYTE nIndex, BYTE Colour) |
Static Public Member Functions | |
static GDrawAsm * | GetContextForCurrentThread (void) |
Used by GRenderRegion to get a thread-safe context for rendering. | |
Protected Member Functions | |
virtual BOOL | MakeCurrent () |
Swaps the GDraw context Makes the GDraw context passed the current one. | |
Static Protected Member Functions | |
static INT32 | GetContextLength () |
Gets the length of a GDraw context. | |
Protected Attributes | |
GCONTEXT * | m_pContext |
GCONTEXT * | SaveArea |
INT32 | SaveAreaLength |
DWORD | m_ThreadID |
GDrawAsm * | m_pNext |
GDrawAsm * | m_pPrevious |
Static Protected Attributes | |
static GDrawAsm * | Current = NULL |
static INT32 | Instance = 0 |
static GDrawAsm * | sm_pListHead = NULL |
If real GDraw is not available (e.g. Win16) then this returns FALSE from the Init function and all other member functions return failure codes.
Definition at line 172 of file GDrawIntf.h.
|
Definition at line 134 of file GDrawIntf.cpp. 00134 : GDrawContext() 00135 { 00136 m_pContext = NULL; 00137 Instance++; 00138 SaveArea = NULL; 00139 SaveAreaLength = 0; 00140 m_pPrevious = NULL; 00141 m_pNext = NULL; 00142 00143 m_ThreadID = 0; 00144 }
|
|
Definition at line 147 of file GDrawIntf.cpp. 00147 : GDrawContext() 00148 { 00149 m_pContext = NULL; 00150 Instance++; 00151 SaveArea = NULL; 00152 SaveAreaLength = 0; 00153 m_pPrevious = NULL; 00154 m_pNext = NULL; 00155 00156 if (ThreadID == 0) 00157 ThreadID = wxThread::GetCurrentId(); 00158 00159 // Insert this at the beginning of the list 00160 m_pNext = sm_pListHead; 00161 sm_pListHead = this; 00162 00163 m_ThreadID = ThreadID; 00164 }
|
|
Destructor - performs required tidy up.
Definition at line 350 of file GDrawIntf.cpp. 00351 { 00352 CriticalSection Ralph; 00353 00354 // TRACEUSER( "Gerry", _T("Deleting GDrawAsm at 0x%08x\n"), this); 00355 00356 if (Instance > 0) 00357 Instance--; 00358 00359 // if (Instance == 0) 00360 // XaDrawOld_Terminate(); // only terminate when the last one goes 00361 00362 // if (Instance == 0) 00363 // { 00364 // XaDraw_Terminate(s_pContext); // only terminate when the last one goes 00365 // CCFree(s_pContext); 00366 // s_pContext = NULL; 00367 // } 00368 00369 if (this == GRenderRegion::GetStaticDrawContext()) 00370 { 00371 TRACEUSER("Gerry", _T("Deleting current GDraw context at 0x%08x\n"), this); 00372 GRenderRegion::SetTempDrawContext(NULL); 00373 } 00374 00375 if (m_pContext) 00376 { 00377 CamProfile cp(CAMPROFILE_GDRAW); 00378 XaDraw_Terminate(m_pContext); 00379 CCFree(m_pContext); 00380 // TRACEUSER( "Gerry", _T("Released context at 0x%08x\n"), m_pContext); 00381 m_pContext = NULL; 00382 } 00383 00384 // Make Current not point at this cos it's a bit dangerous 00385 if (Current == this) 00386 Current = NULL; 00387 00388 if (SaveArea) 00389 { 00390 // TRACEUSER( "Gerry", _T("Destruct context of %d bytes at 0x%08x\n"), SaveAreaLength, SaveArea); 00391 CCFree((LPBYTE)SaveArea); // Oh well, can't return errors 00392 SaveArea=NULL; // For tidyness 00393 SaveAreaLength = 0; 00394 } 00395 00396 // If we have a thread id 00397 if (m_ThreadID != 0) 00398 { 00399 // Remove this from the list 00400 00401 if (m_pPrevious == NULL || sm_pListHead == this) 00402 { 00403 // We are the first item so make the head point to the next item 00404 sm_pListHead = m_pNext; 00405 } 00406 else 00407 { 00408 // Not the first so make the previous item point to the next item 00409 m_pPrevious->m_pNext = m_pNext; 00410 } 00411 00412 // If we are not the last item 00413 if (m_pNext != NULL) 00414 { 00415 // Make the next item point to the previous item 00416 m_pNext->m_pPrevious = m_pPrevious; 00417 } 00418 } 00419 }
|
|
Adds a colour to a grad table at the specified point.
Implements GDrawContext. Definition at line 1421 of file GDrawIntf.cpp. 01422 { 01423 CriticalSection Ralph; 01424 CamProfile cp(CAMPROFILE_GDRAW); 01425 01426 return (MakeCurrent() && (XaColour_AddToGraduationTable(m_pContext, Colour, HSV, Table, Index ) ? FALSE : TRUE)); 01427 }
|
|
Implements GDrawContext. |
|
Gets table ready for grad fills.
Implements GDrawContext. Definition at line 1446 of file GDrawIntf.cpp. 01447 { 01448 CriticalSection Ralph; 01449 CamProfile cp(CAMPROFILE_GDRAW); 01450 01451 return (MakeCurrent() && (XaColour_BuildGraduationTable(m_pContext, Start, End, HSV, Table ) ? FALSE : TRUE)); 01452 }
|
|
Gets table ready for transparent grad fills.
Implements GDrawContext. Definition at line 1470 of file GDrawIntf.cpp. 01471 { 01472 CriticalSection Ralph; 01473 CamProfile cp(CAMPROFILE_GDRAW); 01474 01475 return (MakeCurrent() && (XaColour_BuildTransparencyTable(m_pContext, Start, End, Table ) ? FALSE : TRUE)); 01476 }
|
|
Implements GDrawContext. Definition at line 2491 of file GDrawIntf.cpp. 02492 { 02493 CriticalSection Ralph; 02494 CamProfile cp(CAMPROFILE_GDRAW); 02495 02496 return (MakeCurrent() && (XaDraw_CalcBBox(m_pContext, Points, Verbs, Length, Rect, FALSE != Flatten ) ? FALSE: TRUE)); 02497 }
|
|
Implements GDrawContext. Definition at line 2464 of file GDrawIntf.cpp. 02474 { 02475 CriticalSection Ralph; 02476 CamProfile cp(CAMPROFILE_GDRAW); 02477 02478 if (!MakeCurrent()) return -1; 02479 return XaDraw_CalcStrokeBBox(m_pContext, IPoints, ITypes, ILength, Rect, 02480 FALSE != Close, LineWidth, LineCaps, LineJoin, Dash ); 02481 }
|
|
Resets 'changed' rectangle. Should be called before anything is drawn, then drawn areas will be accumulated into the BBox.
Implements GDrawContext. Definition at line 2207 of file GDrawIntf.cpp. 02208 { 02209 CriticalSection Ralph; 02210 CamProfile cp(CAMPROFILE_GDRAW); 02211 02212 if (MakeCurrent()) XaDraw_ClearChangedBBox(m_pContext); 02213 }
|
|
Sets clip rectangle of subsequent rendering.
Implements GDrawContext. Definition at line 2182 of file GDrawIntf.cpp. 02183 { 02184 CriticalSection Ralph; 02185 CamProfile cp(CAMPROFILE_GDRAW); 02186 02187 return (MakeCurrent() && (XaDraw_ClipRectangle(m_pContext, Rect ) ? FALSE : TRUE)); 02188 }
|
|
Implements GDrawContext. Definition at line 2524 of file GDrawIntf.cpp. 02525 { 02526 CriticalSection Ralph; 02527 CamProfile cp(CAMPROFILE_GDRAW); 02528 02529 return (MakeCurrent() && (XaDraw_ClipRegion(m_pContext, Region ) ? FALSE: TRUE)); 02530 }
|
|
Converts bitmaps from one format to another. Currently supported modes are: 16->8 and 32->8.
Implements GDrawContext. Definition at line 1595 of file GDrawIntf.cpp. 01597 { 01598 CriticalSection Ralph; 01599 CamProfile cp(CAMPROFILE_GDRAW); 01600 01601 return (MakeCurrent() && (XaColour_ConvertBitmap(m_pContext, SInfo, SBytes, DInfo, DBytes, Dither ) ? FALSE : TRUE)); 01602 }
|
|
Implements GDrawContext. Definition at line 2263 of file GDrawIntf.cpp. 02264 { 02265 CriticalSection Ralph; 02266 CamProfile cp(CAMPROFILE_GDRAW); 02267 02268 MakeCurrent(); // Oooerr, should really not call GDraw if this fails 02269 return XaColour_ConvertHSVtoRGB(hsv ); 02270 }
|
|
Implements GDrawContext. Definition at line 2272 of file GDrawIntf.cpp. 02273 { 02274 CriticalSection Ralph; 02275 CamProfile cp(CAMPROFILE_GDRAW); 02276 02277 MakeCurrent(); // Oooerr, should really not call GDraw if this fails 02278 return XaColour_ConvertRGBtoHSV( rgb ); 02279 }
|
|
Implements GDrawContext. Definition at line 2508 of file GDrawIntf.cpp. 02509 { 02510 CriticalSection Ralph; 02511 CamProfile cp(CAMPROFILE_GDRAW); 02512 02513 return (MakeCurrent() && (XaDraw_DeviceClipRectangle(m_pContext, Rect ) ? FALSE: TRUE)); 02514 }
|
|
Fills the path using the current fill style.
Implements GDrawContext. Definition at line 2034 of file GDrawIntf.cpp. 02035 { 02036 CriticalSection Ralph; 02037 CamProfile cp(CAMPROFILE_GDRAW); 02038 02039 return (MakeCurrent() && (XaDraw_FillPath(m_pContext, Points, Verbs, Length, Winding ) ? FALSE : TRUE)); 02040 }
|
|
Sets one device pixel to the curent fill colour.
Implements GDrawContext. Definition at line 2109 of file GDrawIntf.cpp. 02110 { 02111 CriticalSection Ralph; 02112 CamProfile cp(CAMPROFILE_GDRAW); 02113 02114 return (MakeCurrent() && (XaDraw_FillPoint(m_pContext, Point ) ? FALSE : TRUE)); 02115 }
|
|
Fills the rectangle with the current fill style.
Implements GDrawContext. Definition at line 2085 of file GDrawIntf.cpp. 02086 { 02087 CriticalSection Ralph; 02088 CamProfile cp(CAMPROFILE_GDRAW); 02089 02090 return (MakeCurrent() && (XaDraw_FillRectangle(m_pContext, Rect ) ? FALSE : TRUE)); 02091 }
|
|
Implements GDrawContext. Definition at line 2567 of file GDrawIntf.cpp. 02568 { 02569 CriticalSection Ralph; 02570 CamProfile cp(CAMPROFILE_GDRAW); 02571 02572 return (MakeCurrent() && (XaDraw_FillRegion(m_pContext, Region, Offset ) ? FALSE: TRUE)); 02573 }
|
|
Gets size of 'changed' rectangle where pixels have been plotted.
Implements GDrawContext. Definition at line 2231 of file GDrawIntf.cpp. 02232 { 02233 CriticalSection Ralph; 02234 CamProfile cp(CAMPROFILE_GDRAW); 02235 02236 return (MakeCurrent() && (XaDraw_GetChangedBBox(m_pContext, Rect ) ? FALSE : TRUE)); 02237 }
|
|
Implements GDrawContext. Definition at line 2532 of file GDrawIntf.cpp. 02533 { 02534 CriticalSection Ralph; 02535 CamProfile cp(CAMPROFILE_GDRAW); 02536 02537 return MakeCurrent() ? XaDraw_GetClipRegion(m_pContext) : NULL; 02538 }
|
|
Used by GRenderRegion to get a thread-safe context for rendering.
Definition at line 184 of file GDrawIntf.cpp. 00185 { 00186 CriticalSection Ralph; 00187 00188 GDrawAsm *pContext = sm_pListHead; 00189 00190 DWORD ThreadID = wxThread::GetCurrentId(); 00191 00192 while (pContext && (ThreadID != pContext->m_ThreadID)) 00193 { 00194 pContext = pContext->m_pNext; 00195 } 00196 00197 TRACE( wxT("GetContextForCurrentThread = %p"), pContext ); 00198 00199 return(pContext); 00200 }
|
|
Gets the length of a GDraw context.
Definition at line 560 of file GDrawIntf.cpp. 00561 { 00562 CamProfile cp(CAMPROFILE_GDRAW); 00563 return(XaDraw_ContextLength()); 00564 }
|
|
Implements GDrawContext. Definition at line 2516 of file GDrawIntf.cpp. 02517 { 02518 CriticalSection Ralph; 02519 CamProfile cp(CAMPROFILE_GDRAW); 02520 02521 return (MakeCurrent() && (XaDraw_GetDeviceClipRectangle(m_pContext, Rect ) ? FALSE: TRUE)); 02522 }
|
|
Implements GDrawContext. Definition at line 762 of file GDrawIntf.cpp. 00763 { 00764 CamProfile cp(CAMPROFILE_GDRAW); 00765 return(XaColour_GetGraduationTableLength()); 00766 }
|
|
Implements GDrawContext. Definition at line 736 of file GDrawIntf.cpp. 00737 { 00738 CriticalSection Ralph; 00739 00740 if (!MakeCurrent()) 00741 return(0); 00742 00743 CamProfile cp(CAMPROFILE_GDRAW); 00744 00745 return(XaColour_GetGraduationTableSize(m_pContext)); 00746 }
|
|
Implements GDrawContext. Definition at line 713 of file GDrawIntf.cpp. 00714 { 00715 CamProfile cp(CAMPROFILE_GDRAW); 00716 if (!MakeCurrent()) 00717 return(GERROR_OUT_OF_MEMORY); 00718 else 00719 return(XaDraw_GetLastError(m_pContext)); 00720 }
|
|
Implements GDrawContext. Definition at line 807 of file GDrawIntf.cpp. 00808 { 00809 CamProfile cp(CAMPROFILE_GDRAW); 00810 return(XaColour_GetLongGraduationTableLength()); 00811 }
|
|
Implements GDrawContext. Definition at line 782 of file GDrawIntf.cpp. 00783 { 00784 CriticalSection Ralph; 00785 00786 if (!MakeCurrent()) 00787 return(0); 00788 00789 CamProfile cp(CAMPROFILE_GDRAW); 00790 return(XaColour_GetLongGraduationTableSize(m_pContext)); 00791 }
|
|
Implements GDrawContext. Definition at line 897 of file GDrawIntf.cpp. 00898 { 00899 CamProfile cp(CAMPROFILE_GDRAW); 00900 return(XaColour_GetLongTransparentGraduationTableLength()); 00901 }
|
|
Implements GDrawContext. Definition at line 872 of file GDrawIntf.cpp. 00873 { 00874 CriticalSection Ralph; 00875 00876 if (!MakeCurrent()) 00877 return(0); 00878 00879 CamProfile cp(CAMPROFILE_GDRAW); 00880 return(XaColour_GetLongTransparentGraduationTableSize()); 00881 }
|
|
Implements GDrawContext. Definition at line 459 of file GDrawIntf.cpp. 00460 { 00461 CamProfile cp(CAMPROFILE_GDRAW); 00462 return(XaDraw_GetMaxBitmapDepth()); 00463 }
|
|
Implements GDrawContext. Definition at line 437 of file GDrawIntf.cpp. 00438 { 00439 CamProfile cp(CAMPROFILE_GDRAW); 00440 return(XaDraw_GetMaxBitmapWidth()); 00441 }
|
|
Fills the path counting various things about it.
Implements GDrawContext. Definition at line 2060 of file GDrawIntf.cpp. 02062 { 02063 CriticalSection Ralph; 02064 CamProfile cp(CAMPROFILE_GDRAW); 02065 02066 return (MakeCurrent() && ((XaDraw_GetStatistics(m_pContext, Points, Verbs, Length, Winding, Stats )) ? (FALSE || 1 ) : TRUE)); 02067 }
|
|
Implements GDrawContext. Definition at line 852 of file GDrawIntf.cpp. 00853 { 00854 CamProfile cp(CAMPROFILE_GDRAW); 00855 return(XaColour_GetTransparentGraduationTableLength()); 00856 }
|
|
Implements GDrawContext. Definition at line 827 of file GDrawIntf.cpp. 00828 { 00829 CriticalSection Ralph; 00830 00831 if (!MakeCurrent()) 00832 return(0); 00833 00834 CamProfile cp(CAMPROFILE_GDRAW); 00835 return(XaColour_GetTransparentGraduationTableSize()); 00836 }
|
|
Implements GDrawContext. Definition at line 2540 of file GDrawIntf.cpp. 02546 { 02547 // return (MakeCurrent() && (XaDraw_HintPath(m_pContext, Points, Types, Length, Close, LineWidth ) ? FALSE: TRUE)); 02548 return FALSE; 02549 }
|
|
Definition at line 286 of file GDrawIntf.cpp. 00287 { 00288 // TRACEUSER( "Gerry", _T("Initialising GDrawAsm at 0x%08x from 0x%08x\n"), this, pSource); 00289 00290 if (pSource->m_pContext == NULL) 00291 return(FALSE); 00292 00293 DWORD GVer = XaDraw_GetVersion(); 00294 00295 // to be compatible, the major numbers must match and the minor number must be 00296 // at least the one we built this file with 00297 if ( ( HIWORD(GVer) > (WORD)GDRAW_VERSION_MAJOR ) || 00298 (( HIWORD(GVer) == (WORD)GDRAW_VERSION_MAJOR ) 00299 #if GDRAW_VERSION_MINOR>0 // Suppress compiler warning 00300 && ( LOWORD(GVer) >= (WORD)GDRAW_VERSION_MINOR) 00301 #endif 00302 ) 00303 ) 00304 { 00305 if (m_pContext) 00306 { 00307 XaDraw_Terminate(m_pContext); 00308 // TRACEUSER( "Gerry", _T("Reusing context at 0x%08x\n"), m_pContext); 00309 } 00310 00311 // Create the context 00312 INT32 Len = XaDraw_ContextLength(); 00313 if (Len > 0) 00314 { 00315 if (m_pContext == NULL) 00316 m_pContext = (GCONTEXT*)CCMalloc(Len); 00317 if (m_pContext) 00318 { 00319 // TRACEUSER( "Gerry", _T("Claimed context of %d bytes at 0x%08x\n"), Len, m_pContext); 00320 XaDraw_CopyContext(pSource->m_pContext, m_pContext); 00321 return TRUE; 00322 } 00323 else 00324 { 00325 TRACEUSER( "Gerry", _T("Failed to claim context of %d bytes\n"), Len); 00326 } 00327 } 00328 } 00329 00330 return FALSE; 00331 }
|
|
Can the this pointer be used to render things.
Implements GDrawContext. Definition at line 238 of file GDrawIntf.cpp. 00239 { 00240 // TRACEUSER( "Gerry", _T("Initialising GDrawAsm at 0x%08x\n"), this); 00241 DWORD GVer = XaDraw_GetVersion(); 00242 00243 // to be compatible, the major numbers must match and the minor number must be 00244 // at least the one we built this file with 00245 if ( ( HIWORD(GVer) > (WORD)GDRAW_VERSION_MAJOR ) || 00246 (( HIWORD(GVer) == (WORD)GDRAW_VERSION_MAJOR ) 00247 #if GDRAW_VERSION_MINOR>0 // Suppress compiler warning 00248 && ( LOWORD(GVer) >= (WORD)GDRAW_VERSION_MINOR) 00249 #endif 00250 ) 00251 ) 00252 { 00253 if (m_pContext) 00254 { 00255 XaDraw_Terminate(m_pContext); 00256 // TRACEUSER( "Gerry", _T("Reusing context at 0x%08x\n"), m_pContext); 00257 } 00258 00259 CamProfile cp(CAMPROFILE_GDRAW); 00260 00261 // Create the context 00262 INT32 Len = XaDraw_ContextLength(); 00263 if (Len > 0) 00264 { 00265 if (m_pContext == NULL) 00266 m_pContext = (GCONTEXT*)CCMalloc(Len); 00267 if (m_pContext) 00268 { 00269 // TRACEUSER( "Gerry", _T("Claimed context of %d bytes at 0x%08x\n"), Len, m_pContext); 00270 // memset(m_pContext, 0x01, Len); 00271 XaDraw_Initialise(m_pContext, NULL); 00272 XaDraw_SetMemoryHandlers(m_pContext, GDraw_Alloc, GDraw_Free); 00273 return TRUE; 00274 } 00275 else 00276 { 00277 TRACEUSER( "Gerry", _T("Failed to claim context of %d bytes\n"), Len); 00278 } 00279 } 00280 } 00281 00282 return FALSE; 00283 }
|
|
Implements GDrawContext. Definition at line 2315 of file GDrawIntf.cpp. 02316 { 02317 CriticalSection Ralph; 02318 CamProfile cp(CAMPROFILE_GDRAW); 02319 02320 return (MakeCurrent() && (XaColour_InitialiseWithPalette(m_pContext,Palette) ? FALSE : TRUE)); 02321 }
|
|
Implements GDrawContext. Definition at line 2483 of file GDrawIntf.cpp. 02484 { 02485 CriticalSection Ralph; 02486 CamProfile cp(CAMPROFILE_GDRAW); 02487 02488 return (MakeCurrent() && (XaDraw_IsOverlap(m_pContext, Points, Verbs, Length, Winding ) ? FALSE : TRUE)); 02489 }
|
|
Swaps the GDraw context Makes the GDraw context passed the current one.
Definition at line 651 of file GDrawIntf.cpp. 00652 { 00653 // Check we're not already the current context 00654 if (this == Current) 00655 return(TRUE); // that was easy 00656 00657 #if FALSE 00658 if (Current != NULL) // then we need to do a save 1st 00659 { 00660 if (Current->SaveAreaLength != Current->GetContextLength()) 00661 { 00662 if (Current->SaveArea != NULL) // free old one if it exists 00663 { 00664 TRACEUSER( "Gerry", _T("Freeing context of %d bytes at 0x%08x\n"), Current->SaveAreaLength, Current->SaveArea); 00665 CCFree((LPBYTE)(Current->SaveArea)); 00666 Current->SaveArea = NULL; // For tidyness 00667 Current->SaveAreaLength = 0; 00668 } 00669 00670 Current->SaveAreaLength = Current->GetContextLength(); 00671 Current->SaveArea = (GCONTEXT *) CCMalloc(Current->SaveAreaLength); 00672 TRACEUSER( "Gerry", _T("Claimed context of %d bytes at 0x%08x\n"), Current->SaveAreaLength, Current->SaveArea); 00673 } 00674 00675 if (Current->SaveArea == NULL) 00676 { 00677 // Can't save the current context so return false 00678 Current->SaveAreaLength = 0; 00679 return(FALSE); 00680 } 00681 00682 if (!(Current->SaveContext(Current->SaveArea))) 00683 return(FALSE); 00684 } 00685 00686 // If this context has a saved state then restore it 00687 if (SaveArea != NULL) 00688 RestoreContext(SaveArea); // Ignore errors 00689 #endif 00690 00691 // Set current context 00692 Current = this; 00693 00694 // It worked 00695 return (TRUE); 00696 }
|
|
Implements GDrawContext. Definition at line 2499 of file GDrawIntf.cpp. 02500 { 02501 CriticalSection Ralph; 02502 CamProfile cp(CAMPROFILE_GDRAW); 02503 02504 if (!MakeCurrent()) return -1; 02505 return XaDraw_MakeRegion(m_pContext, Points, Verbs, Length, Winding, ORegion, OLength ); 02506 }
|
|
Implements GDrawContext. Definition at line 2551 of file GDrawIntf.cpp. 02558 { 02559 CriticalSection Ralph; 02560 CamProfile cp(CAMPROFILE_GDRAW); 02561 02562 if (!MakeCurrent()) return -1; 02563 return XaDraw_MakeUnclippedRegion(m_pContext, Points, Types, Length, Winding, ORegion, OLength ); 02564 }
|
|
This returns a scale factor that should be safe to use for a drawing of the size of the given bounding box. Currently only the translation values of the matrix are used. To convert this maximum scale factor to a zoom value, divide by the scale factor required for 100% zoom.
+-S,0,0,+-S,Tx,Ty where S is the value returned and Tx,Ty are the translation values of the given matrix.
Implements GDrawContext. Definition at line 1314 of file GDrawIntf.cpp. 01315 { 01316 CriticalSection Ralph; 01317 CamProfile cp(CAMPROFILE_GDRAW); 01318 01319 if (!MakeCurrent()) return -1; 01320 return XaDraw_MaxScale(m_pContext, Matrix, BBox ); 01321 }
|
|
Implements GDrawContext. Definition at line 2440 of file GDrawIntf.cpp. 02443 { 02444 CriticalSection Ralph; 02445 CamProfile cp(CAMPROFILE_GDRAW); 02446 02447 return (MakeCurrent() && (XaBitmap_PlotTile(m_pContext, bmInfo, lpBytes, Style, Points, Points+1, Points+2, 02448 (CONST BGRT*)ColourTable, Red, Green, Blue, Trans) 02449 ? FALSE : TRUE)); 02450 }
|
|
Implements GDrawContext. Definition at line 2452 of file GDrawIntf.cpp. 02455 { 02456 CriticalSection Ralph; 02457 CamProfile cp(CAMPROFILE_GDRAW); 02458 02459 return (MakeCurrent() && (XaBitmap_PlotTile4(m_pContext, bmInfo, lpBytes, Style, Points, Points+1, Points+2, Points+3, 02460 (CONST BGRT*)ColourTable, Red, Green, Blue, Trans) 02461 ? FALSE : TRUE)); 02462 }
|
|
Restores the GDraw context.
Implements GDrawContext. Definition at line 606 of file GDrawIntf.cpp. 00607 { 00608 // return(XaDrawOld_RestoreContext(Context)==0); 00609 CamProfile cp(CAMPROFILE_GDRAW); 00610 return(XaDraw_CopyContext(Context, m_pContext)==0); 00611 // return(TRUE); 00612 }
|
|
Implements GDrawContext. Definition at line 2323 of file GDrawIntf.cpp. 02324 { 02325 CriticalSection Ralph; 02326 CamProfile cp(CAMPROFILE_GDRAW); 02327 02328 if (!MakeCurrent()) return NULL; 02329 return XaColour_ReturnBrush(m_pContext); 02330 }
|
|
Implements GDrawContext. Definition at line 2332 of file GDrawIntf.cpp. 02333 { 02334 CriticalSection Ralph; 02335 CamProfile cp(CAMPROFILE_GDRAW); 02336 02337 if (!MakeCurrent()) return NULL; 02338 return XaColour_ReturnBrushRGB(m_pContext); 02339 }
|
|
Saves the GDraw context.
Implements GDrawContext. Definition at line 582 of file GDrawIntf.cpp. 00583 { 00584 // return(XaDrawOld_SaveContext(Context)==0); 00585 CamProfile cp(CAMPROFILE_GDRAW); 00586 return(XaDraw_CopyContext(m_pContext, Context)==0); 00587 // return(TRUE); 00588 }
|
|
Returns a 256 colour logical palette that should be used in 8-bit modes.
Implements GDrawContext. Definition at line 1621 of file GDrawIntf.cpp. 01622 { 01623 CriticalSection Ralph; 01624 CamProfile cp(CAMPROFILE_GDRAW); 01625 01626 if (!MakeCurrent()) return NULL; 01627 return XaColour_SelectPalette(m_pContext, FALSE != WhichPal ); 01628 }
|
|
Implements GDrawContext. Definition at line 2619 of file GDrawIntf.cpp. 02622 { 02623 CriticalSection Ralph; 02624 CamProfile cp(CAMPROFILE_GDRAW); 02625 02626 return (MakeCurrent() && ( 02627 XaColour_Set3WayGraduation(m_pContext,Style, ColourA, ColourB, ColourD, PointA, PointB, PointD) 02628 ? FALSE : TRUE) ); 02629 }
|
|
Implements GDrawContext. Definition at line 2632 of file GDrawIntf.cpp. 02635 { 02636 CriticalSection Ralph; 02637 CamProfile cp(CAMPROFILE_GDRAW); 02638 02639 return (MakeCurrent() && ( 02640 XaColour_Set3WayGraduation4(m_pContext,Style, ColourA, ColourB, ColourD, PointA, PointB, PointC, PointD) 02641 ? FALSE : TRUE) ); 02642 }
|
|
Implements GDrawContext. Definition at line 2645 of file GDrawIntf.cpp. 02648 { 02649 CriticalSection Ralph; 02650 CamProfile cp(CAMPROFILE_GDRAW); 02651 02652 return (MakeCurrent() && ( 02653 XaColour_Set4WayGraduation(m_pContext,Style, ColourA, ColourB, ColourC, ColourD, PointA, PointB, PointD) 02654 ? FALSE : TRUE) ); 02655 }
|
|
Implements GDrawContext. Definition at line 2658 of file GDrawIntf.cpp. 02661 { 02662 CriticalSection Ralph; 02663 CamProfile cp(CAMPROFILE_GDRAW); 02664 02665 return (MakeCurrent() && ( 02666 XaColour_Set4WayGraduation4(m_pContext,Style, ColourA, ColourB, ColourC, ColourD, PointA, PointB, PointC, PointD) 02667 ? FALSE : TRUE) ); 02668 }
|
|
Sets the matrix to be used during rendering.
Implements GDrawContext. Definition at line 1113 of file GDrawIntf.cpp. 01114 { 01115 CriticalSection Ralph; 01116 CamProfile cp(CAMPROFILE_GDRAW); 01117 01118 if (MakeCurrent()) XaDraw_SetAntialiasFlag(m_pContext, FALSE != Flag ); 01119 }
|
|
Implements GDrawContext. Definition at line 1137 of file GDrawIntf.cpp. 01138 { 01139 CriticalSection Ralph; 01140 CamProfile cp(CAMPROFILE_GDRAW); 01141 01142 if (MakeCurrent()) XaDraw_SetAntialiasQualityFlag(m_pContext, FALSE != Flag ); 01143 }
|
|
Implements GDrawContext. Definition at line 2575 of file GDrawIntf.cpp. 02576 { 02577 CriticalSection Ralph; 02578 CamProfile cp(CAMPROFILE_GDRAW); 02579 02580 if (!MakeCurrent()) 02581 return -1; 02582 02583 return XaDraw_SetBevelContrast(m_pContext,nContrast) ? FALSE : TRUE; 02584 }
|
|
Implements GDrawContext. Definition at line 2597 of file GDrawIntf.cpp. 02598 { 02599 CriticalSection Ralph; 02600 CamProfile cp(CAMPROFILE_GDRAW); 02601 02602 if (!MakeCurrent()) 02603 return -1; 02604 02605 return XaDraw_SetBevelDarkness(m_pContext,nContrast); 02606 }
|
|
Implements GDrawContext. Definition at line 2586 of file GDrawIntf.cpp. 02587 { 02588 CriticalSection Ralph; 02589 CamProfile cp(CAMPROFILE_GDRAW); 02590 02591 if (!MakeCurrent()) 02592 return -1; 02593 02594 return XaDraw_SetBevelLightness(m_pContext,nContrast); 02595 }
|
|
Implements GDrawContext. |
|
Implements GDrawContext. Definition at line 1061 of file GDrawIntf.cpp. 01062 { 01063 CriticalSection Ralph; 01064 CamProfile cp(CAMPROFILE_GDRAW); 01065 01066 #if defined(__WXMSW__) || !USE_wxBITMAP 01067 return (MakeCurrent() && (XaDraw_SetDIBitmap(m_pContext, BitmapInfo,Bitmap, BitmapFormat) ? FALSE : TRUE)); 01068 #else 01069 return (MakeCurrent() && (XaDraw_SetInvertedDIBitmap(m_pContext, BitmapInfo,Bitmap, BitmapFormat) ? FALSE : TRUE)); 01070 #endif 01071 }
|
|
This function will set up the bitmap conversion table for use by the following plotting functions:.
This table is used to convert BGR values. It should be a 128K dword table indexed by a 17 bit index : bbbbbgggggrrrrr00. Bits must be set in the separation style of the above functions in order to make use of this table. Implements GDrawContext. Definition at line 2429 of file GDrawIntf.cpp. 02430 { 02431 CriticalSection Ralph; 02432 CamProfile cp(CAMPROFILE_GDRAW); 02433 02434 return(MakeCurrent() && 02435 (XaColour_SetBitmapConversionTable(m_pContext,BitmapConversionTable) 02436 ? FALSE : TRUE)); 02437 }
|
|
Implements GDrawContext. |
|
Implements GDrawContext. |
|
Sets size of 'changed' rectangle where pixels have been plotted.
Implements GDrawContext. Definition at line 2255 of file GDrawIntf.cpp. 02256 { 02257 CriticalSection Ralph; 02258 CamProfile cp(CAMPROFILE_GDRAW); 02259 02260 return (MakeCurrent() && (XaDraw_SetChangedBBox(m_pContext, Rect ) ? FALSE : TRUE)); 02261 }
|
|
Sets drawing colour to be used in subsequent rendering.
Implements GDrawContext. Definition at line 1494 of file GDrawIntf.cpp. 01495 { 01496 CriticalSection Ralph; 01497 CamProfile cp(CAMPROFILE_GDRAW); 01498 01499 return (MakeCurrent() && (XaColour_SetColour(m_pContext, Colour ) ? FALSE : TRUE)); 01500 }
|
|
Implements GDrawContext. |
|
Implements GDrawContext. |
|
Sets the Palette that is to be used for ConvertBitmap.
Implements GDrawContext. Definition at line 1367 of file GDrawIntf.cpp. 01368 { 01369 CriticalSection Ralph; 01370 CamProfile cp(CAMPROFILE_GDRAW); 01371 01372 return (MakeCurrent() && (XaColour_SetConversionPalette(m_pContext, pPalette ) ? FALSE : TRUE)); 01373 }
|
|
Implements GDrawContext. Definition at line 2299 of file GDrawIntf.cpp. 02300 { 02301 CriticalSection Ralph; 02302 CamProfile cp(CAMPROFILE_GDRAW); 02303 02304 return (MakeCurrent() && (XaDraw_SetDashAdjustmentFlag(m_pContext, FALSE != Flag) ? FALSE : TRUE)); 02305 }
|
|
Sets the style of the dither patterns.
Implements GDrawContext. Definition at line 1394 of file GDrawIntf.cpp. 01395 { 01396 CriticalSection Ralph; 01397 CamProfile cp(CAMPROFILE_GDRAW); 01398 01399 return (MakeCurrent() && (XaColour_SetDitherStyle(m_pContext,Style) ? FALSE : TRUE)); 01400 }
|
|
Sets the flattening.
Implements GDrawContext. Definition at line 1254 of file GDrawIntf.cpp. 01255 { 01256 CriticalSection Ralph; 01257 CamProfile cp(CAMPROFILE_GDRAW); 01258 01259 if (MakeCurrent()) XaDraw_SetFlatness(m_pContext, Flat ); 01260 }
|
|
Implements GDrawContext. |
|
Implements GDrawContext. |
|
Reads the currently selected palette and builds internal tables based upon the results. Should be called after a palette change. Note that this may take a few seconds to execute and should be called sparingly.
Implements GDrawContext. Definition at line 1658 of file GDrawIntf.cpp. 01665 { 01666 CriticalSection Ralph; 01667 CamProfile cp(CAMPROFILE_GDRAW); 01668 01669 return (MakeCurrent() && (XaColour_SetGraduation(m_pContext, Style, Table, PointA, PointB, PointC ) ? FALSE : TRUE)); 01670 }
|
|
Reads the currently selected palette and builds internal tables based upon the results. Should be called after a palette change. Note that this may take a few seconds to execute and should be called sparingly.
Implements GDrawContext. Definition at line 1747 of file GDrawIntf.cpp. 01755 { 01756 CriticalSection Ralph; 01757 CamProfile cp(CAMPROFILE_GDRAW); 01758 01759 return (MakeCurrent() && (XaColour_SetGraduation4(m_pContext, Style, Table, PointA, PointB, PointC, PointD ) ? FALSE : TRUE)); 01760 }
|
|
Sets the origin of the dither patterns.
Implements GDrawContext. Definition at line 1343 of file GDrawIntf.cpp. 01344 { 01345 CriticalSection Ralph; 01346 CamProfile cp(CAMPROFILE_GDRAW); 01347 01348 if (MakeCurrent()) XaColour_SetHalftoneOrigin(m_pContext, x, y ); 01349 }
|
|
Sets the flag in GDraw which forces all exactly horizontal and vertical line segments to be hinted onto pixel centres. / void GDrawAsm::SetMaxFilterSize( UINT32 uSize ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); if ( MakeCurrent() ) XaBitmap_SetMaxFilterSize(m_pContext,uSize); } /*!/ BOOL GDrawAsm::Blur( INT32 nBlur ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_Blur(m_pContext,nBlur) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::Sharpen( INT32 nSharpen ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_Sharpen(m_pContext,nSharpen) ? FALSE : TRUE); } /*!
Implements GDrawContext. Definition at line 1230 of file GDrawIntf.cpp. 01231 { 01232 CriticalSection Ralph; 01233 CamProfile cp(CAMPROFILE_GDRAW); 01234 01235 if (MakeCurrent()) XaDraw_SetHintingFlag(m_pContext, FALSE != Flag ); 01236 }
|
|
Implements GDrawContext. |
|
Implements GDrawContext. Definition at line 2307 of file GDrawIntf.cpp. 02308 { 02309 CriticalSection Ralph; 02310 CamProfile cp(CAMPROFILE_GDRAW); 02311 02312 return (MakeCurrent() && (XaColour_SetInvert(m_pContext,Colour) ? FALSE : TRUE)); 02313 }
|
|
Sets the matrix to be used during rendering.
Implements GDrawContext. Definition at line 1089 of file GDrawIntf.cpp. 01090 { 01091 CriticalSection Ralph; 01092 CamProfile cp(CAMPROFILE_GDRAW); 01093 01094 return (MakeCurrent() && (XaDraw_SetMatrix(m_pContext, GMat) ? FALSE : TRUE)); 01095 }
|
|
Implements GDrawContext. Definition at line 2294 of file GDrawIntf.cpp. 02295 { 02296 return FALSE; 02297 }
|
|
Implements GDrawContext. |
|
Implements GDrawContext. Definition at line 2286 of file GDrawIntf.cpp. 02287 { 02288 CriticalSection Ralph; 02289 CamProfile cp(CAMPROFILE_GDRAW); 02290 02291 return (MakeCurrent() && (XaDraw_SetMiterLimit(m_pContext,MiterLimit) ? FALSE : TRUE)); 02292 }
|
|
Implements GDrawContext. |
|
Implements GDrawContext. |
|
Implements GDrawContext. |
|
Implements GDrawContext. |
|
Implements GDrawContext. |
|
Sets process colour separation tables to be used in the future by various GDraw calls. See the GDraw documentation for details.
Call with all parameters == NULL to restore the defaults. Implements GDrawContext. Definition at line 2377 of file GDrawIntf.cpp. 02383 { 02384 CriticalSection Ralph; 02385 CamProfile cp(CAMPROFILE_GDRAW); 02386 02387 return(MakeCurrent() && 02388 (XaColour_SetSeparationTables(m_pContext,CyanSepTable, MagentaSepTable, 02389 YellowSepTable, BlackSepTable, 02390 UnderColourRemovalTable, BlackGenerationTable) 02391 ? FALSE : TRUE)); 02392 }
|
|
Sets drawing colour to be used in subsequent rendering.
Implements GDrawContext. Definition at line 1518 of file GDrawIntf.cpp. 01519 { 01520 CriticalSection Ralph; 01521 CamProfile cp(CAMPROFILE_GDRAW); 01522 01523 return (MakeCurrent() && (XaColour_SetSolidColour(m_pContext, Colour, BPP, Format ) ? FALSE : TRUE)); 01524 }
|
|
Stops bad paths form using all stack space up.
Implements GDrawContext. Definition at line 921 of file GDrawIntf.cpp. 00922 { 00923 CriticalSection Ralph; 00924 00925 ERROR3("SetStackLimit() is not thread safe!!! Use SetStackSize() instead."); 00926 00927 if (!(MakeCurrent())) return; 00928 CamProfile cp(CAMPROFILE_GDRAW); 00929 XaDraw_SetStackLimit(m_pContext, stack); 00930 }
|
|
Stops bad paths form using all stack space up.
Implements GDrawContext. Definition at line 949 of file GDrawIntf.cpp. 00950 { 00951 CriticalSection Ralph; 00952 00953 if (!(MakeCurrent())) return; 00954 CamProfile cp(CAMPROFILE_GDRAW); 00955 XaDraw_SetStackSize(m_pContext, StackSize); 00956 }
|
|
Sets smoothest rendering of bitmaps - rotation & scaling.
Implements GDrawContext. Definition at line 1174 of file GDrawIntf.cpp. 01175 { 01176 CriticalSection Ralph; 01177 CamProfile cp(CAMPROFILE_GDRAW); 01178 01179 if (MakeCurrent()) XaColour_SetTileFilteringFlag(m_pContext, FALSE != Flag ); 01180 }
|
|
Sets smoother rendering of Bitmap Plotting, but does not work with perspectivised!
Implements GDrawContext. Definition at line 1156 of file GDrawIntf.cpp. 01157 { 01158 CriticalSection Ralph; 01159 CamProfile cp(CAMPROFILE_GDRAW); 01160 01161 if (MakeCurrent()) XaColour_SetTileSmoothingFlag(m_pContext, FALSE != Flag ); 01162 }
|
|
Sets drawing colour to be used in subsequent rendering with transparency. Only has effect if output device can do transparency, else falls into SetColour.
Implements GDrawContext. Definition at line 1568 of file GDrawIntf.cpp. 01569 { 01570 CriticalSection Ralph; 01571 CamProfile cp(CAMPROFILE_GDRAW); 01572 01573 return (MakeCurrent() && (XaColour_SetTransparency(m_pContext, Colour, Trans ) ? FALSE : TRUE)); 01574 }
|
|
Sets the table for type 12 transparency. / BOOL GDrawAsm::SetBias( UINT32 uChannel,double fBias ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_SetBias(m_pContext,uChannel,fBias) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::SetGain( UINT32 uChannel,double fGain ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_SetGain(m_pContext,uChannel,fGain) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::SetBrightness( double fBrightness ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_SetBrightness(m_pContext,fBrightness) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::SetContrast( double fContrast ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_SetContrast(m_pContext,fContrast) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::SetGamma( double fGamma ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_SetGamma(m_pContext,fGamma) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::SetPostGamma( double fPostGamma ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_SetPostGamma(m_pContext,fPostGamma) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::SetSaturation( double fSaturation ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_SetSaturation(m_pContext,fSaturation) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::SetContone( UINT32 uContoneStyle, COLORREF rgbStart, COLORREF rgbEnd ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_SetContone(m_pContext,uContoneStyle,rgbStart,rgbEnd) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::SetInputRange( UINT32 uChannel, BYTE uStart, BYTE uEnd ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_SetInputRange(m_pContext,uChannel,uStart,uEnd) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::SetOutputRange( UINT32 uChannel, BYTE uStart, BYTE uEnd ) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return MakeCurrent() && (XaBitmap_SetOutputRange(m_pContext,uChannel,uStart,uEnd) ? FALSE : TRUE); } /*!/ BOOL GDrawAsm::SetBitmapFill( LPBITMAPINFOHEADER bmInfo, LPBYTE lpBytes, DWORD Style, LPPOINT Points, COLORREF DefaultColour, LPRGBQUAD ColourTable, LPBYTE Red, LPBYTE Green, LPBYTE Blue, LPBYTE Trans, DWORD Offset) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return (MakeCurrent() && (XaColour_SetTilePattern(m_pContext, bmInfo, lpBytes, Style, Points, Points+1, Points+2, DefaultColour, (CONST BGRT*)ColourTable, Red, Green, Blue, NULL, Offset) ? FALSE : TRUE)); } BOOL GDrawAsm::SetTransparentBitmapFill( LPBITMAPINFOHEADER bmInfo, LPBYTE lpBytes, DWORD Style, LPPOINT Points, COLORREF DefaultColour, BYTE* pTable, DWORD Offset) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return (MakeCurrent() && (XaColour_SetTransparentTilePattern(m_pContext, bmInfo, lpBytes, Style, Points, Points+1, Points+2, DefaultColour, pTable, Offset) ? FALSE : TRUE)); } BOOL GDrawAsm::SetPerspectiveBitmapFill( LPBITMAPINFOHEADER bmInfo, LPBYTE lpBytes, DWORD Style, LPPOINT Points, COLORREF DefaultColour, LPRGBQUAD ColourTable, LPBYTE Red, LPBYTE Green, LPBYTE Blue, LPBYTE Trans, DWORD Offset) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return (MakeCurrent() && (XaColour_SetTilePattern4(m_pContext, bmInfo, lpBytes, Style, Points, Points+1, Points+2, Points+3, DefaultColour, (CONST BGRT*)ColourTable, Red, Green, Blue, Trans, Offset) ? FALSE : TRUE)); } BOOL GDrawAsm::SetPerspectiveTransparentBitmapFill( LPBITMAPINFOHEADER bmInfo, LPBYTE lpBytes, DWORD Style, LPPOINT Points, COLORREF DefaultColour, BYTE* pTable, DWORD Offset) { CriticalSection Ralph; CamProfile cp(CAMPROFILE_GDRAW); return (MakeCurrent() && (XaColour_SetTransparentTilePattern4(m_pContext, bmInfo, lpBytes, Style, Points, Points+1, Points+2, Points+3, DefaultColour, pTable, Offset) ? FALSE : TRUE)); } /*!
Implements GDrawContext. Definition at line 1971 of file GDrawIntf.cpp. 01972 { 01973 CriticalSection Ralph; 01974 CamProfile cp(CAMPROFILE_GDRAW); 01975 01976 return (MakeCurrent() && (XaColour_SetTransparencyLookupTable(m_pContext,Table) 01977 ? FALSE : TRUE)); 01978 }
|
|
Implements GDrawContext. Definition at line 2671 of file GDrawIntf.cpp. 02674 { 02675 CriticalSection Ralph; 02676 CamProfile cp(CAMPROFILE_GDRAW); 02677 02678 return (MakeCurrent() && ( 02679 XaColour_SetTransparent3WayGraduation(m_pContext,Style, ValueA, ValueB, ValueD, PointA, PointB, PointD) 02680 ? FALSE : TRUE) ); 02681 }
|
|
Implements GDrawContext. Definition at line 2684 of file GDrawIntf.cpp. 02687 { 02688 CriticalSection Ralph; 02689 CamProfile cp(CAMPROFILE_GDRAW); 02690 02691 return (MakeCurrent() && ( 02692 XaColour_SetTransparent3WayGraduation4(m_pContext,Style, ValueA, ValueB, ValueD, PointA, PointB, PointC, PointD) 02693 ? FALSE : TRUE) ); 02694 }
|
|
Implements GDrawContext. Definition at line 2697 of file GDrawIntf.cpp. 02700 { 02701 CriticalSection Ralph; 02702 CamProfile cp(CAMPROFILE_GDRAW); 02703 02704 return (MakeCurrent() && ( 02705 XaColour_SetTransparent4WayGraduation(m_pContext,Style, ValueA, ValueB, ValueC, ValueD, PointA, PointB, PointD) 02706 ? FALSE : TRUE) ); 02707 }
|
|
Implements GDrawContext. Definition at line 2710 of file GDrawIntf.cpp. 02713 { 02714 CriticalSection Ralph; 02715 CamProfile cp(CAMPROFILE_GDRAW); 02716 02717 return (MakeCurrent() && ( 02718 XaColour_SetTransparent4WayGraduation4(m_pContext,Style, ValueA, ValueB, ValueC, ValueD, PointA, PointB, PointC, PointD) 02719 ? FALSE : TRUE) ); 02720 }
|
|
Implements GDrawContext. |
|
Reads the currently selected palette and builds internal tables based upon the results. Should be called after a palette change. Note that this may take a few seconds to execute and should be called sparingly.
Implements GDrawContext. Definition at line 1700 of file GDrawIntf.cpp. 01707 { 01708 CriticalSection Ralph; 01709 CamProfile cp(CAMPROFILE_GDRAW); 01710 01711 Style = Style & 0xFFFF00FF; 01712 if (Table->IsLarge()) 01713 Style |= 0x0100; 01714 01715 return (MakeCurrent() && (XaColour_SetTransparentGraduation(m_pContext, Style, Table->GetTable(), PointA, PointB, PointC ) ? FALSE : TRUE)); 01716 }
|
|
Reads the currently selected palette and builds internal tables based upon the results. Should be called after a palette change. Note that this may take a few seconds to execute and should be called sparingly.
Implements GDrawContext. Definition at line 1790 of file GDrawIntf.cpp. 01798 { 01799 CriticalSection Ralph; 01800 CamProfile cp(CAMPROFILE_GDRAW); 01801 01802 Style = Style & 0xFFFF00FF; 01803 if (Table->IsLarge()) 01804 Style |= 0x0100; 01805 01806 return (MakeCurrent() && (XaColour_SetTransparentGraduation4(m_pContext, Style, Table->GetTable(), PointA, PointB, PointC, PointD ) ? FALSE : TRUE)); 01807 }
|
|
This is the bitmap that will be drawn into with rendering calls.
Implements GDrawContext. Definition at line 974 of file GDrawIntf.cpp. 00975 { 00976 CriticalSection Ralph; 00977 00978 if (!(MakeCurrent())) return(FALSE); 00979 // build a Windows-like structure because thats what Gavin wants. 00980 00981 BITMAPINFOHEADER bmInfo; 00982 00983 bmInfo.biSize = sizeof(BITMAPINFOHEADER); 00984 bmInfo.biWidth = Width; 00985 bmInfo.biHeight = Height; 00986 bmInfo.biPlanes = 1; 00987 bmInfo.biBitCount = (WORD)Depth; 00988 00989 if(DoBiCompression == TRUE) 00990 { 00991 // In GDraw 2.008 Docs it says that 32 bit BMPs need this setting to this value 00992 // if they are to use the Transparency channel. 00993 bmInfo.biCompression = 0x80000001; 00994 } 00995 else 00996 { 00997 bmInfo.biCompression = BI_RGB; 00998 } 00999 01000 bmInfo.biSizeImage = 0L; 01001 bmInfo.biXPelsPerMeter = 1000; 01002 bmInfo.biYPelsPerMeter = 1000; 01003 bmInfo.biClrUsed = 0; 01004 bmInfo.biClrImportant = 0; 01005 01006 // Set up bitmap, but preserve the changed bounding box... 01007 RECT BBox; 01008 GetChangedBBox(&BBox); 01009 01010 if(DoBiCompression == TRUE && Bits != NULL) 01011 { 01012 // Another point stated in the GDraw 2.008 Docs is that the 32bit BMP should be 01013 // Initialized to 00,00,00,FF for every pixel! 01014 01015 DWORD* pSetBits = (DWORD*)Bits; 01016 DWORD BMPSIZE = (Width * Height);// >> 2; // Ilan - why was there a ">> 2"?? 01017 DWORD Index = 0; 01018 01019 while(Index < BMPSIZE) 01020 { 01021 pSetBits[Index++] = 0xFF000000; 01022 } 01023 } 01024 01025 if ( Depth == 8 ) 01026 { 01027 // If the bitmap is 8 bit then we must use a format of 0 for Gavin to avoid using his new greyscale bitmap stuff 01028 // This is quite horrible as we are corrupting an entry parameter to this function 01029 // but as nothing seems to be setting this correctly in 8 bit modes there is little easy alternative 01030 Format = 0; 01031 } 01032 01033 CamProfile cp(CAMPROFILE_GDRAW); 01034 #if defined(__WXMSW__) || !USE_wxBITMAP 01035 BOOL Result = XaDraw_SetDIBitmap(m_pContext, &bmInfo, Bits, Format) ? FALSE : TRUE; 01036 #else 01037 BOOL Result = XaDraw_SetInvertedDIBitmap(m_pContext, &bmInfo, Bits, Format) ? FALSE : TRUE; 01038 #endif 01039 01040 // Bodged out until this is implemented... 01041 // SetChangedBBox(&BBox); 01042 01043 return Result; 01044 }
|
|
Sets drawing colour to be used in subsequent rendering.
Implements GDrawContext. Definition at line 1542 of file GDrawIntf.cpp. 01543 { 01544 CriticalSection Ralph; 01545 CamProfile cp(CAMPROFILE_GDRAW); 01546 01547 return (MakeCurrent() && (XaColour_SetWordColour(m_pContext, Colour ) ? FALSE : TRUE)); 01548 }
|
|
Implements GDrawContext. |
|
Implements GDrawContext. |
|
Converts a path into another path by sort-of stroking in toto another data structure.
Implements GDrawContext. Definition at line 2145 of file GDrawIntf.cpp. 02157 { 02158 CriticalSection Ralph; 02159 CamProfile cp(CAMPROFILE_GDRAW); 02160 02161 if (!MakeCurrent()) return -1; 02162 return XaDraw_StrokePathToPath(m_pContext, IPoints, ITypes, ILength, OPoints, OTypes, OLength, 02163 FALSE != Close, LineWidth, LineCaps, LineJoin, Dash ); 02164 }
|
|
Convert any number of points using a GMatrix.
Implements GDrawContext. Definition at line 1279 of file GDrawIntf.cpp. 01280 { 01281 CriticalSection Ralph; 01282 CamProfile cp(CAMPROFILE_GDRAW); 01283 01284 if (MakeCurrent()) XaDraw_TransformPath(m_pContext, IPoints, OPoints, Length, GMat ); 01285 }
|
|
Implements GDrawContext. Definition at line 2608 of file GDrawIntf.cpp. 02609 { 02610 CriticalSection Ralph; 02611 CamProfile cp(CAMPROFILE_GDRAW); 02612 02613 if (!MakeCurrent()) 02614 return -1; 02615 02616 return XaDraw_TranslateBevelValue(m_pContext,nIndex, Colour); 02617 }
|
|
Definition at line 447 of file GDrawIntf.h. |
|
Definition at line 448 of file GDrawIntf.h. |
|
Definition at line 436 of file GDrawIntf.h. |
|
Definition at line 443 of file GDrawIntf.h. |
|
Definition at line 444 of file GDrawIntf.h. |
|
Definition at line 441 of file GDrawIntf.h. |
|
Definition at line 439 of file GDrawIntf.h. |
|
Definition at line 440 of file GDrawIntf.h. |
|
Definition at line 450 of file GDrawIntf.h. |