gbrush.cpp

Go to the documentation of this file.
00001 // $Id: gbrush.cpp 1282 2006-06-09 09:46:49Z alex $
00002 /* @@tag:xara-cn@@ DO NOT MODIFY THIS LINE
00003 ================================XARAHEADERSTART===========================
00004  
00005                Xara LX, a vector drawing and manipulation program.
00006                     Copyright (C) 1993-2006 Xara Group Ltd.
00007        Copyright on certain contributions may be held in joint with their
00008               respective authors. See AUTHORS file for details.
00009 
00010 LICENSE TO USE AND MODIFY SOFTWARE
00011 ----------------------------------
00012 
00013 This file is part of Xara LX.
00014 
00015 Xara LX is free software; you can redistribute it and/or modify it
00016 under the terms of the GNU General Public License version 2 as published
00017 by the Free Software Foundation.
00018 
00019 Xara LX and its component source files are distributed in the hope
00020 that it will be useful, but WITHOUT ANY WARRANTY; without even the
00021 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00022 See the GNU General Public License for more details.
00023 
00024 You should have received a copy of the GNU General Public License along
00025 with Xara LX (see the file GPL in the root directory of the
00026 distribution); if not, write to the Free Software Foundation, Inc., 51
00027 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
00028 
00029 
00030 ADDITIONAL RIGHTS
00031 -----------------
00032 
00033 Conditional upon your continuing compliance with the GNU General Public
00034 License described above, Xara Group Ltd grants to you certain additional
00035 rights. 
00036 
00037 The additional rights are to use, modify, and distribute the software
00038 together with the wxWidgets library, the wxXtra library, and the "CDraw"
00039 library and any other such library that any version of Xara LX relased
00040 by Xara Group Ltd requires in order to compile and execute, including
00041 the static linking of that library to XaraLX. In the case of the
00042 "CDraw" library, you may satisfy obligation under the GNU General Public
00043 License to provide source code by providing a binary copy of the library
00044 concerned and a copy of the license accompanying it.
00045 
00046 Nothing in this section restricts any of the rights you have under
00047 the GNU General Public License.
00048 
00049 
00050 SCOPE OF LICENSE
00051 ----------------
00052 
00053 This license applies to this program (XaraLX) and its constituent source
00054 files only, and does not necessarily apply to other Xara products which may
00055 in part share the same code base, and are subject to their own licensing
00056 terms.
00057 
00058 This license does not apply to files in the wxXtra directory, which
00059 are built into a separate library, and are subject to the wxWindows
00060 license contained within that directory in the file "WXXTRA-LICENSE".
00061 
00062 This license does not apply to the binary libraries (if any) within
00063 the "libs" directory, which are subject to a separate license contained
00064 within that directory in the file "LIBS-LICENSE".
00065 
00066 
00067 ARRANGEMENTS FOR CONTRIBUTION OF MODIFICATIONS
00068 ----------------------------------------------
00069 
00070 Subject to the terms of the GNU Public License (see above), you are
00071 free to do whatever you like with your modifications. However, you may
00072 (at your option) wish contribute them to Xara's source tree. You can
00073 find details of how to do this at:
00074   http://www.xaraxtreme.org/developers/
00075 
00076 Prior to contributing your modifications, you will need to complete our
00077 contributor agreement. This can be found at:
00078   http://www.xaraxtreme.org/developers/contribute/
00079 
00080 Please note that Xara will not accept modifications which modify any of
00081 the text between the start and end of this header (marked
00082 XARAHEADERSTART and XARAHEADEREND).
00083 
00084 
00085 MARKS
00086 -----
00087 
00088 Xara, Xara LX, Xara X, Xara X/Xtreme, Xara Xtreme, the Xtreme and Xara
00089 designs are registered or unregistered trademarks, design-marks, and/or
00090 service marks of Xara Group Ltd. All rights in these marks are reserved.
00091 
00092 
00093       Xara Group Ltd, Gaddesden Place, Hemel Hempstead, HP2 6EX, UK.
00094                         http://www.xara.com/
00095 
00096 =================================XARAHEADEREND============================
00097  */
00098 
00099 // class to use raw to obtain GDI brush patterns
00100 
00101 
00102 #include "camtypes.h"
00103 #include "gbrush.h"
00104 //#include "ensure.h"
00105 #include "devcolor.h"
00106 //#include "doccolor.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00107 //#include "fixmem.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00108 #include "grndrgn.h"
00109 //#include "app.h"
00110 #include "gbrushop.h"
00111 //#include "andy.h"
00112 //#include "docview.h"
00113 //#include "ccolbar.h"
00114 #include "gdrawcon.h"
00115 #include "gdraw.h"
00116 //#include "dibutil.h" - in camtypes.h [AUTOMATICALLY REMOVED]
00117 //#include "palman.h"
00118 
00119 CC_IMPLEMENT_MEMDUMP(GBrush, ListItem)
00120 CC_IMPLEMENT_DYNCREATE(OpGBrush, Operation)
00121 #define new CAM_DEBUG_NEW
00122 
00123 
00124 List            GBrush::BrushList;                  // list of all active brushes
00125 GBrush          *GBrush::Current;                   // current brush, or NULL
00126 static BOOL WantBetterBrushes = TRUE;               // TRUE to use these, FALSE to not
00127 
00128 
00129 /********************************************************************************************
00130 
00131     Preference: BetterBrushes
00132     Section:    Screen
00133     Range:      0 or 1
00134     Purpose:    Allows the user to determine whether GDraw brushes are used (1) or normal
00135                 GDI brushes (0). Defaults to 1 because it produces a much nicer colour bar.
00136 
00137 ********************************************************************************************/
00138 
00139 /********************************************************************************************
00140 
00141 >   BOOL GBrush::InitGBrush( BOOL FirstTime )
00142 
00143     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00144     Created:    5/4/94
00145     Inputs:     FirstTime is TRUE if called from starup, FALSE if called subsequently (e.g.
00146                 after screen mode change).
00147     Outputs:    -
00148     Returns:    TRUE if worked, FALSE if failed (e.g. no memory). Returns TRUE if not
00149                 required too (e.g. incompatible screen depth) i.e. FALSE is an error which
00150                 could be serious.
00151     Purpose:    GBuilds the pretend bitmap which ise used to fool GDraw into suppyling us
00152                 with brushes. Called from GRenderRegion::Init and relies on that being called
00153                 first.
00154     SeeAlso:    GBrush::Init
00155     Errors:     -
00156     Scope:      Static
00157 
00158 ********************************************************************************************/
00159 
00160 BOOL GBrush::InitGBrush(BOOL FirstTime)
00161 {
00162     if (FirstTime && Camelot.DeclareSection( wxT("Screen"), 10))
00163     {
00164         Camelot.DeclarePref(NULL, wxT("BetterBrushes"), &WantBetterBrushes, FALSE, TRUE );
00165     }
00166     // Register the (debug) Op to enable/disable GBrush
00167     if (!Operation::RegisterOpDescriptor(
00168                         0,
00169                         _R(IDS_GBRUSH),
00170                         CC_RUNTIME_CLASS(OpGBrush),
00171                         OPTOKEN_GBRUSH,
00172                         OpGBrush::GetState,
00173                         0,  /* help ID */
00174                         0, //_R(IDBBL_ANTIALIASOP),
00175                         0   /* bitmap ID */
00176                         ))
00177     {
00178         TRACE( wxT("RegisterOpDescriptor( OpGBrush ) failed") );
00179         return FALSE;
00180     }
00181 
00182     // Ensure that none of the GBrushes are active
00183     NewBrushState();
00184     Current = NULL;
00185 
00186     return TRUE;
00187 }
00188 
00189 
00190 
00191 /********************************************************************************************
00192 
00193 >   void GBrush::DeinitGBrush(void)
00194 
00195     Author:     Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
00196     Created:    11/9/95
00197 
00198     Purpose:    De-initialises the GBrush pretend bitmap. Called on DeInit of GRenderRegion
00199                 to shut down without a memory leak taking place.
00200 
00201     SeeAlso:    GBrush::InitGBrush
00202 
00203     Errors:     ERROR3 with graceful exit if there are GBrushes still active at the time
00204 
00205     Scope:      Static
00206 
00207 ********************************************************************************************/
00208 
00209 void GBrush::DeinitGBrush(void)
00210 {
00211 #ifdef _DEBUG
00212     // This was an ERROR3, but our stupid error handler doesn't handle errors very well,
00213     // (in fact, at this stage in program de-initialisation, it doesn' handle them at all)
00214     // so it's just a trace warning now.
00215     if (!BrushList.IsEmpty())
00216     {
00217         TRACEALL( wxT("Warning: Deinitialising GBrush when GBrush(es) still active\n\n" ) );
00218     }
00219 #endif
00220 }
00221 
00222 
00223 /********************************************************************************************
00224 
00225 >   GBrush::GBrush()
00226 
00227     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00228     Created:    5/4/94
00229     Inputs:     -
00230     Outputs:    -
00231     Returns:    -
00232     Purpose:    GBrush constructor. Call Init before trying to use.
00233     SeeAlso:    GBrush::Init
00234     Errors:     -
00235 
00236 ********************************************************************************************/
00237 
00238 GBrush::GBrush()
00239 {
00240     CanUse = FALSE;
00241     Valid = FALSE;
00242 
00243     BrushList.AddHead( this );
00244 
00245     UseSolidColours = FALSE;
00246 }
00247 
00248 
00249 
00250 /********************************************************************************************
00251 
00252 >   GBrush::~GBrush()
00253 
00254     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00255     Created:    5/4/94
00256     Inputs:     -
00257     Outputs:    -
00258     Returns:    -
00259     Purpose:    GBrush destructor. Does necessary cleanup.
00260     Errors:     -
00261 
00262 ********************************************************************************************/
00263 
00264 GBrush::~GBrush()
00265 {
00266     if (Current == this)
00267         Current = NULL;
00268 
00269 #ifdef _DEBUG
00270     ListItem *Old = BrushList.RemoveItem( this );
00271     ERROR3IF( Old == NULL, "GBrush being deleted not in list" );
00272 #else
00273     BrushList.RemoveItem( this ); // to suppress compiler warning in both debug & retail builds
00274 #endif
00275 }
00276 
00277 
00278 /********************************************************************************************
00279 
00280 >   BOOL GBrush::Init( HDC RefDC )
00281 
00282     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00283     Created:    5/4/94
00284     Inputs:     RefDC - an HDC of the output device (must be screen currently).
00285                 This must remain a valid DC for the entire length of time that this
00286                 brush is used.
00287     Outputs:    -
00288     Returns:    TRUE if GBrush is available for use, FALSE if not.
00289     Purpose:    Determines whether a GBrush can be used in the given device. Call Start
00290                 before trying to use, assuming a TRUE result.
00291     Errors:     -
00292 
00293 ********************************************************************************************/
00294 
00295 BOOL GBrush::Init( wxDC* RefDC )
00296 {
00297     ENSURE( Current==NULL, "Only one current GBrush at a time" );
00298 
00299     Valid = FALSE;                                          // in case of failure
00300 
00301     ReferenceDC = RefDC;                                    // remember for Start time
00302 
00303     CanUse = TRUE;
00304     return CanUse;
00305 }
00306 
00307 
00308 
00309 /********************************************************************************************
00310 
00311 >   void GBrush::Start()
00312 
00313     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00314     Created:    5/4/94
00315     Inputs:     -
00316     Outputs:    -
00317     Returns:    -
00318     Purpose:    Call before trying to use the GBrush. There can only be one active GBrush
00319                 in use at a time. Will fail silently if not available.
00320     Errors:     GBrush::Available
00321 
00322 ********************************************************************************************/
00323 
00324 void GBrush::Start()
00325 {
00326     ENSURE( Current==NULL, "Only one current GBrush at a time" );
00327 
00328     if (CanUse && WantBetterBrushes)
00329     {
00330         GDrawContext *GContext = GRenderRegion::GetStaticDrawContext();
00331 
00332         // We checked this in Init() so it should be OK, but we might as well be safe
00333         if (GContext != NULL)
00334         {
00335             Valid = TRUE;
00336             Current = this;
00337 
00338             // Get the 16bpp screen hinting value so Gavin can do solid colours properly
00339             DWORD GavinHint = DIBUtil::GetGavinBlitFormat(GRenderRegion::ScreenDepth,
00340                                     32, GRenderRegion::ScreenHinting);
00341 
00342             // And set Gavin up to render into our brush bitmap
00343             GContext->SetupBitmap( 
00344                 4,4, 
00345                 GRenderRegion::ScreenDepth==24?32:GRenderRegion::ScreenDepth, 
00346                 NULL, 
00347                 GavinHint
00348             );
00349 
00350             // We want dithering not error diffusion please GDraw
00351             /*pcLOGPALETTE lpPal =*/ GContext->SelectPalette(0);
00352 
00353             // In 8bpp, make sure GDraw is aware of the current system palette
00354             if (GRenderRegion::ScreenDepth == 8)
00355                 GRenderRegion::GColInit( ReferenceDC );
00356 
00357             // Attempt to ensure halftone patterns always use the same origin
00358             GContext->SetHalftoneOrigin(0, 0);
00359         }
00360         else
00361             ERROR3("GDraw Context not available in GBrush::Start()");
00362     }
00363 }
00364 
00365 
00366 
00367 /********************************************************************************************
00368 
00369 >   void GBrush::Stop()
00370 
00371     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00372     Created:    5/4/94
00373     Inputs:     -
00374     Outputs:    -
00375     Returns:    -
00376     Purpose:    Says 'we have stopped using this for the moment'. Call Start to start again.
00377                 It is not necessary to call this before destruction. Safe to call even if not
00378                 Available.
00379     Errors:     -
00380 
00381 ********************************************************************************************/
00382 
00383 void GBrush::Stop()
00384 {
00385     if (Current == this)
00386         Current = NULL;
00387 
00388     Valid = FALSE;
00389 }
00390 
00391 
00392 
00393 /********************************************************************************************
00394 
00395 >   inline void GBrush::GetLogBrushInternal( const COLORREF rgb, LPLOGBRUSH lpBrush )
00396 
00397     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com> (Jason)
00398     Created:    5/4/94 (28/6/94)
00399     Inputs:     rgb - a GDI/GDraw style RGB word defining the colour
00400     Outputs:    lpBrush is updated to create a suitably brush which can then be passed
00401                 to CreateBrushIndirect.
00402     Returns:    -
00403     Purpose:    The whole point of the GBrush class is to get one of these. This is an
00404                 inline macro used by the 2 overloaded GetLogBrush functions so the code
00405                 need only be changed in one place.
00406 
00407     Errors:     Will ENSURE if not Available.
00408     Notes:      This is fundametally the same as the other overloaded GetLogBrush,
00409                 but for efficiency I've repeated the code in both functions.
00410 
00411                 SetSolidColours should be called to enable/disable dithering of this brush
00412 
00413     SeeAlso:    GBrush::Available; GBrush::SetSolidColours
00414 
00415 ********************************************************************************************/
00416 
00417 void GBrush::GetLogBrushInternal( const COLORREF rgb, wxBrush* pBrush )
00418 {
00419     ERROR3IF( !Valid, "GBrush called when not available");
00420     ERROR3IF( Current != this, "GBrush not current");
00421 
00422     pBrush->SetStyle(wxSOLID);
00423 
00424     // we let the Widgets handle primary colours cos they should be able to manage it (!)
00425     if ( ((rgb & 0x0000FF)==0x000000 || (rgb & 0x0000FF)==0x0000FF) &&
00426          ((rgb & 0x00FF00)==0x000000 || (rgb & 0x00FF00)==0x00FF00) &&
00427          ((rgb & 0xFF0000)==0x000000 || (rgb & 0xFF0000)==0xFF0000) )
00428     {
00429         pBrush->SetColour(GetRValue(rgb),GetGValue(rgb),GetBValue(rgb));
00430         return;
00431     }
00432 
00433     // We assume the GBrush is defined in the GContext belonging to GRenderRegions
00434     // ARRRGGHHH Who wrote MakeCurrent() without making it Virtual. What a naughty
00435     // boy I am (Andy, that is! - Jason ;-)
00436     GDrawContext *GContext = GRenderRegion::GetStaticDrawContext();
00437     const BYTE *pGBrush = NULL;
00438 
00439     // This was checked in init/start, but we might as well be safe
00440     if (GContext != NULL)
00441     {
00442         // If the current mode is for solid colours (no dithering) then we ask for solid colour.
00443         // This is used for things like pasteboards which shouldn't dither for aesthetic (eor!) reasons
00444         if (UseSolidColours)
00445             GContext->SetSolidColour(rgb);
00446         else
00447             GContext->SetColour(rgb);
00448 
00449         pGBrush = GContext->ReturnBrushRGB();
00450     }
00451     else
00452         ERROR3("GBrush got a NULL GContext!\n");
00453 
00454     if (pGBrush == NULL)
00455         pBrush->SetColour(GetRValue(rgb),GetGValue(rgb),GetBValue(rgb));
00456     else if ( UseSolidColours )
00457         pBrush->SetColour(pGBrush[0],pGBrush[1],pGBrush[2]);
00458     else
00459     {
00460 #ifdef __WXGTK__
00461         // The following line shouldn't be necessary, but wxGTK appears to
00462         // fail if it doesn't have a valid colour when setting the brush
00463         // into a device context.
00464         pBrush->SetColour(0,0,0);
00465 #endif
00466         wxImage image(4,4,(BYTE*)pGBrush,true);
00467         wxBitmap bitmap(image);
00468         pBrush->SetStipple(bitmap);     // Also sets style to wxSTIPPLE
00469     }
00470 }
00471 
00472 
00473 
00474 /********************************************************************************************
00475 
00476 >   void GBrush::SetSolidColours(BOOL SetSolid)
00477 
00478     Author:     Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
00479     Created:    15/5/95
00480     Inputs:     TRUE to turn off dithering of colours, FALSE to turn on dithering
00481 
00482     Purpose:    Allows the dithering of colours to be turned off so they look the same
00483                 using GDraw as they do with the GDI.
00484 
00485     Notes:      By default, GBrushes use dithering.
00486 
00487 ********************************************************************************************/
00488 
00489 void GBrush::SetSolidColours(BOOL SetSolid)
00490 {
00491     UseSolidColours = SetSolid;
00492 }
00493 
00494 
00495 
00496 /********************************************************************************************
00497 
00498 >   void GBrush::GetLogBrush( ColourContext *OutputContext, DocColour &Col,
00499                                 LPLOGBRUSH lpBrush )
00500 
00501     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00502     Created:    5/4/94
00503     Inputs:     OutputContext - The output colour context in which the DocColour
00504                 is to be used.
00505                 Col - colour that the brush is required in
00506     Outputs:    lpBrush is updated to create a suitably brush which can then be passed
00507                 to CreateBrushIndirect.
00508     Returns:    -
00509     Purpose:    The whole point of the GBrush class is to get one of these.
00510     Errors:     Will ENSURE if not Available.
00511     SeeAlso:    GBrush::Available
00512 
00513 ********************************************************************************************/
00514 
00515 void GBrush::GetLogBrush( ColourContext *OutputContext, DocColour &Col, wxBrush* pBrush )
00516 {
00517     const COLORREF rgb = ConvertColourToScreenWord(OutputContext, &Col);
00518 
00519     GetLogBrushInternal(rgb,pBrush);
00520 }
00521 
00522 
00523 
00524 /********************************************************************************************
00525 
00526 >   void GBrush::GetLogBrush( const COLORREF rgb, LPLOGBRUSH lpBrush )
00527 
00528     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>/Jason
00529     Created:    5/4/94 (28/6/94)
00530     Inputs:     rgb - a GDI/GDraw style RGB word defining the colour
00531     Outputs:    lpBrush is updated to create a suitably brush which can then be passed
00532                 to CreateBrushIndirect.
00533     Returns:    -
00534     Purpose:    The whole point of the GBrush class is to get one of these. This method
00535                 returns a brush given the RGB screen word to use fo it. Probably you really
00536                 want to use the other overloaded GetLogBrush method, as this does all the
00537                 colour conversion for you.
00538     Errors:     Will ENSURE if not Available.
00539     SeeAlso:    GBrush::Available
00540 
00541 ********************************************************************************************/
00542 
00543 void GBrush::GetLogBrush( const COLORREF rgb, wxBrush* pBrush )
00544 {
00545     GetLogBrushInternal(rgb,pBrush);
00546 }
00547 
00548 
00549 
00550 /********************************************************************************************
00551 
00552 >   void GBrush::NewBrushState()
00553 
00554     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00555     Created:    28/7/94
00556     Inputs:     -
00557     Outputs:    -
00558     Returns:    -
00559     Purpose:    Called when the WantBetterBrushes state changes. Goes around and invalidates
00560                 any current GBrushes, else they will be wrong.
00561                 It also frees the global memory block in each GBrush so it will be
00562                 re-allocated.
00563 
00564 ********************************************************************************************/
00565 
00566 void GBrush::NewBrushState()
00567 {
00568     // find all current GBrushes
00569     ListItem *Item = BrushList.GetHead();
00570     while (Item)
00571     {
00572         // check type
00573         #ifdef _DEBUG
00574         ENSURE( Item->GetRuntimeClass() == CC_RUNTIME_CLASS(GBrush), "Not GBrush in list");
00575         #endif
00576 
00577         // safe to cast now
00578         GBrush *const Brush = (GBrush*const)Item;
00579         Brush->Stop();                                  // reset Valid & Current
00580 
00581         // get next one in list
00582         Item = BrushList.GetNext( Item );
00583     }
00584 }
00585 
00586 
00587 
00588 
00589 
00590 // --- Operation to enable/disable GBrush plotting. Used only for debug purposes ---
00591 
00592 /*******************************************************************
00593 
00594 >   void OpGBrush::Do(OpDescriptor*)
00595 
00596     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00597     Created:    7/4/94
00598     Inputs:     None
00599     Outputs:    None
00600     Returns:    None
00601     Purpose:    Toggles state of GBrush flag then forces a redraw.
00602     Errors:     None
00603 
00604 *******************************************************************/
00605 
00606 void OpGBrush::Do(OpDescriptor*)
00607 {
00608     WantBetterBrushes ^= TRUE;
00609 
00610     // Iterate over all the documents, forcing a redraw of all the views.
00611     ListItem* pItem = Camelot.Documents.GetHead();
00612     while (pItem != NULL)
00613     {
00614         ((Document*) pItem)->ForceRedraw();
00615         pItem = Camelot.Documents.GetNext(pItem);
00616     }
00617 
00618     // invalidate current brushes
00619     GBrush::NewBrushState();
00620 
00621 #ifndef STANDALONE
00622     // This is not likely to remain an interactively-alterable option,
00623     // so for now we just poke at the colour bar to make it redraw itself
00624     // in the new mode.
00625     PORTNOTETRACE("other","OpGBrush::Do - removed call to RedrawGBrushAreas");
00626 #ifndef EXCLUDE_FROM_XARALX
00627     CColourBar::RedrawGBrushAreas();
00628 #endif
00629     // We should also do this for galleries (e.g. colour gallery) but
00630     // as this can only be done in debug builds it's not worth the effort.
00631 #endif
00632 
00633     End();
00634 }
00635 
00636 
00637 
00638 /*******************************************************************
00639 
00640 >   OpGBrush::OpGBrush()
00641 
00642     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00643     Created:    7/4/94
00644     Inputs:
00645     Outputs:
00646     Returns:
00647     Purpose:    Constructor for OpGBrush operation. It is not undoable.
00648     Errors:     None
00649 
00650 *******************************************************************/
00651 
00652 OpGBrush::OpGBrush()
00653 {
00654 }
00655 
00656 
00657 
00658 /*******************************************************************
00659 
00660 >   OpState OpGBrush::GetState(String_256*, OpDescriptor*)
00661 
00662     Author:     Andy_Pennell (Xara Group Ltd) <camelotdev@xara.com>
00663     Created:    7/4/94
00664     Inputs:
00665     Outputs:
00666     Returns:
00667     Purpose:    This item is always available.
00668     Errors:     None
00669 
00670 *******************************************************************/
00671 
00672 OpState OpGBrush::GetState(String_256*, OpDescriptor*)
00673 {
00674     OpState OpSt;
00675 
00676     if (WantBetterBrushes)
00677         OpSt.Ticked = TRUE;
00678 
00679     return OpSt;
00680 }
00681 

Generated on Sat Nov 10 03:48:30 2007 for Camelot by  doxygen 1.4.4