wxArt2D
Classes | Macros | Typedefs | Enumerations | Functions | Variables
stylebase.h File Reference

Stroke and fill base classes. More...

#include "wx/wx.h"
#include <wx/fontenc.h>
#include <wx/encconv.h>
#include <wx/bitmap.h>
#include "a2dprivate.h"
#include "wx/geometry.h"
#include <map>
#include <ft2build.h>
#include <FT_FREETYPE_H>
#include <FT_GLYPH_H>
#include <freetype/ftoutln.h>
#include "wx/general/gen.h"
#include "wx/xmlparse/genxmlpars.h"
#include "wx/artbase/artglob.h"
#include "wx/artbase/liner.h"
#include "wx/artbase/afmatrix.h"
#include "wx/artbase/bbox.h"
Include dependency graph for stylebase.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  a2dFill
 
class  a2dStroke
 Base class for all types of strokes, understood by a2dDrawer2D classes. More...
 
class  a2dCharHash
 wxChar hashing function, used in hash maps. More...
 
class  a2dCharEqual
 wxChar equality class, used in hash maps. More...
 
struct  a2dGlyph
 holes one glyph from a freetype font. More...
 
class  a2dFontInfo
 Font info class, used as a single element for enumerating fonts. More...
 
class  a2dFont
 Defines a font to be set to a2dDrawer2D or stored in a2dCanvsObject etc. More...
 
class  a2dFreetypeModule
 initiates Freetype library More...
 
class  a2dExtStroke
 
class  a2dExtFill
 

Macros

#define NORMFONT   1000
 Normalization font size used for bigger size drawing of text.
 
#define SMALLTEXTTHRESHOLD   10
 

Typedefs

typedef float a2dDash
 
typedef int wxPenJoin
 
typedef int wxPenCap
 
typedef int wxPolygonFillMode
 
typedef int wxRasterOperationMode
 
typedef a2dVertexList ** a2dStrokeGlyph
 A list of pointers to vertexlists. Ends with NULL.
 

Enumerations

enum  a2dFillStyle {
  a2dFILL_TRANSPARENT, a2dFILL_SOLID, a2dFILL_BDIAGONAL_HATCH, a2dFILL_CROSSDIAG_HATCH,
  a2dFILL_FDIAGONAL_HATCH, a2dFILL_CROSS_HATCH, a2dFILL_HORIZONTAL_HATCH, a2dFILL_VERTICAL_HATCH,
  a2dFIRST_HATCH = a2dFILL_BDIAGONAL_HATCH, a2dLAST_HATCH = a2dFILL_VERTICAL_HATCH, a2dFILL_TWOCOL_BDIAGONAL_HATCH, a2dFILL_TWOCOL_CROSSDIAG_HATCH,
  a2dFILL_TWOCOL_FDIAGONAL_HATCH, a2dFILL_TWOCOL_CROSS_HATCH, a2dFILL_TWOCOL_HORIZONTAL_HATCH, a2dFILL_TWOCOL_VERTICAL_HATCH,
  a2dFIRST_TWOCOL_HATCH = a2dFILL_TWOCOL_BDIAGONAL_HATCH, a2dLAST_TWOCOL_HATCH = a2dFILL_TWOCOL_VERTICAL_HATCH, a2dFILL_STIPPLE, a2dFILL_STIPPLE_MASK_OPAQUE,
  a2dFILL_STIPPLE_MASK_OPAQUE_TRANSPARENT, a2dFILL_GRADIENT_FILL_XY_LINEAR, a2dFILL_GRADIENT_FILL_XY_RADIAL, a2dFILL_GRADIENT_FILL_XY_DROP,
  a2dFILL_INHERIT, a2dFILL_LAYER, a2dFILL_NULLFILL
}
 Filling styles for a2dFill. More...
 
enum  a2dFillType {
  a2dFILL_NULL, a2dFILL_ONE_COLOUR, a2dFILL_HATCH_TWO_COLOUR, a2dFILL_GRADIENT_FILL_LINEAR,
  a2dFILL_GRADIENT_FILL_RADIAL, a2dFILL_BITMAP
}
 for a2dFill to define the type of filling. More...
 
enum  a2dStrokeStyle {
  a2dSTROKE_TRANSPARENT, a2dSTROKE_SOLID, a2dSTROKE_DOT, a2dSTROKE_LONG_DASH,
  a2dSTROKE_SHORT_DASH, a2dSTROKE_DOT_DASH, a2dSTROKE_USER_DASH, a2dSTROKE_BDIAGONAL_HATCH,
  a2dSTROKE_CROSSDIAG_HATCH, a2dSTROKE_FDIAGONAL_HATCH, a2dSTROKE_CROSS_HATCH, a2dSTROKE_HORIZONTAL_HATCH,
  a2dSTROKE_VERTICAL_HATCH, a2dSTROKE_STIPPLE, a2dSTROKE_STIPPLE_MASK_OPAQUE, a2dSTROKE_STIPPLE_MASK_OPAQUE_TRANSPARENT,
  a2dSTROKE_OBJECTS, a2dSTROKE_INHERIT, a2dSTROKE_LAYER, a2dSTROKE_NULLSTROKE
}
 stroke styles for a2dStroke More...
 
enum  a2dStrokeType {
  a2dSTROKE_NULL, a2dSTROKE_OBJECT, a2dSTROKE_NORMAL, a2dSTROKE_ONE_COLOUR,
  a2dSTROKE_BITMAP
}
 
enum  wxBrushStyle {
  wxBRUSHSTYLE_INVALID = -1, wxBRUSHSTYLE_SOLID = wxSOLID, wxBRUSHSTYLE_TRANSPARENT = wxTRANSPARENT, wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE,
  wxBRUSHSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK, wxBRUSHSTYLE_STIPPLE = wxSTIPPLE, wxBRUSHSTYLE_BDIAGONAL_HATCH = wxBDIAGONAL_HATCH, wxBRUSHSTYLE_CROSSDIAG_HATCH = wxCROSSDIAG_HATCH,
  wxBRUSHSTYLE_FDIAGONAL_HATCH = wxFDIAGONAL_HATCH, wxBRUSHSTYLE_CROSS_HATCH = wxCROSS_HATCH, wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHORIZONTAL_HATCH, wxBRUSHSTYLE_VERTICAL_HATCH = wxVERTICAL_HATCH,
  wxBRUSHSTYLE_FIRST_HATCH = wxFIRST_HATCH, wxBRUSHSTYLE_LAST_HATCH = wxLAST_HATCH
}
 
enum  a2dFontType { a2dFONT_NULL, a2dFONT_WXDC, a2dFONT_FREETYPE, a2dFONT_STROKED }
 
enum  a2dFontAlignment {
  wxMIDY = 0x0000, wxMIDX = wxMIDY, wxMINX = 0x0001, wxMAXX = 0x0002,
  wxMINY = 0x0004, wxMAXY = 0x0008, wxBASELINE = 0x0010, wxBASELINE_CONTRA = 0x0020,
  a2dDEFAULT_ALIGNMENT = wxMAXY | wxMINX
}
 

Functions

 WX_DECLARE_HASH_MAP_WITH_DECL (wxChar, a2dGlyph, a2dCharHash, a2dCharEqual, a2dGlyphHash, class)
 
 WX_DECLARE_HASH_MAP_WITH_DECL (wxChar, double, a2dCharHash, a2dCharEqual, DcWidthHash, class)
 
 WX_DECLARE_HASH_MAP_WITH_DECL (wxString, double, wxStringHash, wxStringEqual, DcKerningHash, class)
 
 WX_DECLARE_LIST_WITH_DECL (a2dFontInfo, a2dFontInfoList, class)
 
void a2dCanvasInitializeStockObjects ()
 to initialize stock style ( a2dStroke a2dFill ) objects. More...
 
void a2dCanvasDeleteStockObjects ()
 to delete stock style ( a2dStroke a2dFill ) objects. More...
 
wxString StrokeStyle2String (a2dStrokeStyle style)
 convert a style enum to a string
 
a2dStrokeStyle StrokeString2Style (const wxString &stylestr)
 convert a string to a style enum
 
wxString FillStyle2String (a2dFillStyle style)
 convert a style enum to a string
 
a2dFillStyle FillString2Style (const wxString &stylestr)
 convert a string to a style enum
 

Variables

a2dPropertyIdColour PROPID_colour
 General colour property id.
 
const a2dFilla2dWHITE_FILL
 global a2dFill stock object for WHITE filling More...
 
const a2dFilla2dBLACK_FILL
 global a2dFill stock object for BLACK filling More...
 
const a2dFilla2dTRANSPARENT_FILL
 global a2dFill stock object for TRANSPARENT filling More...
 
const a2dFilla2dINHERIT_FILL
 global a2dFill stock object for INHERTED from parent object filling More...
 
const a2dFilla2dSELECT_FILL
 global a2dFill stock object for drawing fill of selected objects More...
 
const a2dFilla2dNullFILL
 global a2dFill stock object for defining NO filling More...
 
const a2dStrokea2dBLACK_STROKE
 global a2dStroke stock object for BLACK stroking More...
 
const a2dStrokea2dWHITE_STROKE
 global a2dStroke stock object for WHITE stroking More...
 
const a2dStrokea2dTRANSPARENT_STROKE
 global a2dStroke stock object for TRANSPARENT stroking More...
 
const a2dStrokea2dINHERIT_STROKE
 global a2dStroke stock object for INHERTED from parent object stroking More...
 
const a2dStrokea2dNullSTROKE
 global a2dStroke stock object for NO stroking More...
 
const a2dStrokea2dLAYER_SELECT_STROKE
 global a2dStroke stock object for SELECTED object stroking More...
 
const a2dFonta2dNullFONT
 global a2dFont stock object for NO font More...
 
const a2dFonta2dDEFAULT_CANVASFONT
 global a2dFont stock object for default font More...
 

Detailed Description

Stroke and fill base classes.

Holds style classes, derived from a2dObject. All wxDrawer2D understand the style classes which are set as a2dStroke a2dFill to them. Style classes can be added to a2dCanvasObject's as properties, and this is how these object can be drawn colours which are customizable by the user.

Author
Klaas Holwerda

Copyright: 2000-2004 (c) Klaas Holwerda

Licence: wxWidgets Licence

RCS-ID:

Id:
stylebase.h,v 1.57 2009/10/01 19:22:34 titato Exp

Definition in file stylebase.h.

Enumeration Type Documentation

wxMINY and wxMAXY is defined as lowest and highest of a string boundingbox. Understand on the canvas y axis can be up or down, but text is always written up. Still de size and position of the boundingbox in wordl coordinates stays the same. Fontsize is defined by EM square in world coordinates. And is NOT the highest Y all glyphs en lowest Y. wxMINX (baseline start just before first character) wxMAXX (baseline end after last character) else middle of baseline, being width/2 wxBASELINE text origin at baseline wxBASELINE_CONTRA text origin at baseline but seen from top of boundingbox wxMINY lowest Y of bbox. wxMAXY highest Y of bbox. else middle Bbox in Y.

Definition at line 637 of file stylebase.h.

stroke types TODO ( only Xwindows ) a2dPatternStroke(const wxBitmap& stipple, double width); TODO ( only Xwindows ) a2dPatternStroke(const wxBitmap& stipple, int width);

Enumerator
a2dSTROKE_NORMAL 

not using a bitmap or gradient

a2dSTROKE_ONE_COLOUR 

one colour

a2dSTROKE_BITMAP 

using a bitmap

Definition at line 325 of file stylebase.h.

stylebase.h File Reference -- Sun Oct 12 2014 17:04:27 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation