sgcolour.cpp File Reference

(r1785/r1282)

#include "camtypes.h"
#include "colcomp.h"
#include "collist.h"
#include "colourix.h"
#include "colormgr.h"
#include "colpick.h"
#include "comattrmsg.h"
#include "dragcol.h"
#include "dragmgr.h"
#include "fileutil.h"
#include "lineattr.h"
#include "sgcolour.h"
#include "sgdrag.h"
#include "sginit.h"
#include "sgliboil.h"
#include "sgmenu.h"
#include "ccdc.h"
#include "grnddib.h"
#include "ccolbar.h"
#include "backgrnd.h"
#include "helpuser.h"

Go to the source code of this file.

Defines

#define new   CAM_DEBUG_NEW

Functions

 CC_IMPLEMENT_DYNAMIC (SGColourDragTarget, SGListDragTarget)
void DrawCircle (RenderRegion *Renderer, DocRect &BoundRect)
 Draws a circle filling the width of the given rectangle, using the current render region attributes.

Variables

static BOOL LibraryHasBeenSorted = FALSE
const INT32 SG_ColourNameWidth = 127000
const INT32 SGSORTKEY_BYHUE = 2
 Compares this Colour to the 'other' Colour, to determine their relative positions in the display tree. Returns a value which usually indicates that the other Colour should be inserted before (-1, or 0) or after (+1) this item.
const INT32 SGSORTKEY_BYINTENSITY = 3
const INT32 SGSORTKEY_BYMODEL = 4


Define Documentation

#define new   CAM_DEBUG_NEW
 

Definition at line 158 of file sgcolour.cpp.


Function Documentation

CC_IMPLEMENT_DYNAMIC SGColourDragTarget  ,
SGListDragTarget 
 

void DrawCircle RenderRegion Renderer,
DocRect BoundRect
 

Draws a circle filling the width of the given rectangle, using the current render region attributes.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/6/96
Parameters:
Renderer - The render region to render into [INPUTS] BoundRect - The bounding rectangle to draw the circle into
Scope: private

Definition at line 993 of file sgcolour.cpp.

00994 {
00995     // WEBSTER - markn 23/1/97
00996     // No Circles required.
00997     //
00998 #ifndef WEBSTER
00999     const INT32 CircleSize = BoundRect.Width() / 2;
01000     const INT32 CPDist = (const INT32) ( ((double)CircleSize) * 0.552 );
01001 
01002     Path Circle;
01003     Circle.Initialise(12, 12);
01004     Circle.FindStartOfPath();
01005 
01006     DocCoord Center(BoundRect.lo.x + BoundRect.Width()/2,
01007                     BoundRect.lo.y + BoundRect.Height()/2);
01008 
01009     Circle.InsertMoveTo(DocCoord(Center.x+CircleSize, Center.y));
01010     Circle.InsertCurveTo(DocCoord(Center.x+CircleSize, Center.y+CPDist),
01011                             DocCoord(Center.x+CPDist, Center.y+CircleSize),
01012                             DocCoord(Center.x, Center.y+CircleSize));
01013     Circle.InsertCurveTo(DocCoord(Center.x-CPDist, Center.y+CircleSize),
01014                             DocCoord(Center.x-CircleSize, Center.y+CPDist),
01015                             DocCoord(Center.x-CircleSize, Center.y));
01016     Circle.InsertCurveTo(DocCoord(Center.x-CircleSize, Center.y-CPDist),
01017                             DocCoord(Center.x-CPDist, Center.y-CircleSize),
01018                             DocCoord(Center.x, Center.y-CircleSize));
01019     Circle.InsertCurveTo(DocCoord(Center.x+CPDist, Center.y-CircleSize),
01020                             DocCoord(Center.x+CircleSize, Center.y-CPDist),
01021                             DocCoord(Center.x+CircleSize, Center.y));
01022 
01023     Circle.IsFilled = TRUE;
01024 
01025     Renderer->DrawPath(&Circle);                // and draw it
01026 #endif // WEBSTER
01027 }


Variable Documentation

BOOL LibraryHasBeenSorted = FALSE [static]
 

Definition at line 163 of file sgcolour.cpp.

const INT32 SG_ColourNameWidth = 127000
 

Definition at line 165 of file sgcolour.cpp.

const INT32 SGSORTKEY_BYHUE = 2
 

Compares this Colour to the 'other' Colour, to determine their relative positions in the display tree. Returns a value which usually indicates that the other Colour should be inserted before (-1, or 0) or after (+1) this item.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/95
Parameters:
Other - the Colour to compare this Colour to [INPUTS] SortKey - An integer identifying how to compare the items 0 = No sorting (always returns 0) 1 = Sort-by-name 2 = Sort-by-hue 3 = Sort-by-intensity 4 = Sort-by-model
Returns:
negative (I am lesser), 0 (we are equal), or positive (I am greater)
See also:
SGDisplayNode::CompareTo

Definition at line 598 of file sgcolour.cpp.

const INT32 SGSORTKEY_BYINTENSITY = 3
 

Definition at line 599 of file sgcolour.cpp.

const INT32 SGSORTKEY_BYMODEL = 4
 

Definition at line 600 of file sgcolour.cpp.


Generated on Sat Nov 10 03:49:20 2007 for Camelot by  doxygen 1.4.4