GUIDOLib  1.7.7
Guido Engine Internal Documentation
Classes | Macros | Enumerations | Functions | Variables
Virtual Graphic System

Classes

class  AbstractFont
 a Abstract font class. More...
 
class  BinaryFont
 a DSL font class. More...
 
class  svgendl
 
class  SVGFont
 a SVG font class. More...
 
class  VGColor
 Generic class to manipulate device independant colors. More...
 
class  VGDevice
 Generic platform independant drawing device. More...
 
class  VGFont
 Generic pure virtual & device-independant font class. More...
 
class  VGPen
 Generic class to manipulate device independant pens. More...
 
class  VGSystem
 Generic pure virtual class for manipulating platform independant drawing devices and fonts. More...
 

Macros

#define ALPHA_TRANSPARENT   0
 
#define ALPHA_OPAQUE   255
 

Enumerations

enum  TagType {
  penTag, penWidthTag, penColorTag, fillColorTag,
  fontTag, scaleTag, originTag
}
 
enum  { kNoFont, kMusicFont, kTextFont }
 
enum  { kSVGSizeDivider = 8 }
 

Functions

void writeColor (const VGColor &color) const
 
void writeFormattedImage (VGDevice *pSrcDC) const
 
void writeRasterOpModeToString (VRasterOpMode mode) const
 
void writeFont (const VGFont *font) const
 
 AbstractDevice (std::ostream &outstream, AbstractSystem *system)
 
virtual ~AbstractDevice ()
 
virtual bool IsValid () const
 Returns the ability of the current VGdevice to be drawn into. More...
 
virtual bool BeginDraw ()
 
virtual void EndDraw ()
 
virtual void InvalidateRect (float left, float top, float right, float bottom)
 
virtual void MoveTo (float x, float y)
 
virtual void LineTo (float x, float y)
 
virtual void Line (float x1, float y1, float x2, float y2)
 
virtual void Frame (float left, float top, float right, float bottom)
 
virtual void Arc (float left, float top, float right, float bottom, float startX, float startY, float endX, float endY)
 
virtual void FrameEllipse (float x, float y, float width, float height)
 
virtual void Ellipse (float x, float y, float width, float height, const VGColor &color)
 
virtual void Triangle (float x1, float y1, float x2, float y2, float x3, float y3)
 
virtual void Polygon (const float *xCoords, const float *yCoords, int count)
 
virtual void Rectangle (float left, float top, float right, float bottom)
 
virtual void SetMusicFont (const VGFont *font)
 
virtual const VGFontGetMusicFont () const
 
virtual void SetTextFont (const VGFont *font)
 
virtual const VGFontGetTextFont () const
 
virtual void SelectPen (const VGColor &inColor, float witdh)
 
virtual void SelectFillColor (const VGColor &c)
 
virtual void PushPen (const VGColor &inColor, float inWidth)
 
virtual void PopPen ()
 
virtual void PushFillColor (const VGColor &inColor)
 
virtual void PopFillColor ()
 
virtual void SetRasterOpMode (VRasterOpMode ROpMode)
 
virtual VRasterOpMode GetRasterOpMode () const
 
virtual bool CopyPixels (VGDevice *pSrcDC, float alpha=-1.0)
 
virtual bool CopyPixels (int xDest, int yDest, VGDevice *pSrcDC, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, float alpha=-1.0)
 
virtual bool CopyPixels (int xDest, int yDest, int dstWidth, int dstHeight, VGDevice *pSrcDC, float alpha=-1.0)
 
virtual bool CopyPixels (int xDest, int yDest, int dstWidth, int dstHeight, VGDevice *pSrcDC, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, float alpha=-1.0)
 
virtual void SetScale (float x, float y)
 
virtual void SetOrigin (float x, float y)
 
virtual void OffsetOrigin (float x, float y)
 
virtual void LogicalToDevice (float *x, float *y) const
 
virtual void DeviceToLogical (float *x, float *y) const
 
virtual float GetXScale () const
 
virtual float GetYScale () const
 
virtual float GetXOrigin () const
 
virtual float GetYOrigin () const
 
virtual void NotifySize (int inWidth, int inHeight)
 
virtual int GetWidth () const
 
virtual int GetHeight () const
 
virtual void DrawMusicSymbol (float x, float y, unsigned int inSymbolID)
 
virtual void DrawString (float x, float y, const char *s, int inCharCount)
 
virtual void SetFontColor (const VGColor &inColor)
 
virtual VGColor GetFontColor () const
 
virtual void SetFontBackgroundColor (const VGColor &inColor)
 
virtual VGColor GetFontBackgroundColor () const
 
virtual void SetFontAlign (unsigned int inAlign)
 
virtual unsigned int GetFontAlign () const
 
virtual void SetDPITag (float inDPI)
 
virtual float GetDPITag () const
 
virtual void * GetBitMapPixels ()
 
virtual void ReleaseBitMapPixels ()
 
virtual const char * GetImageData (const char *&outDataPtr, int &outLength)
 
virtual void ReleaseImageData (const char *) const
 
virtual VGSystemgetVGSystem () const
 temporary hack - must be removed asap More...
 
virtual void * GetNativeContext () const
 
virtual void SelectPenColor (const VGColor &inColor)
 
virtual void SelectPenWidth (float witdh)
 
virtual void PushPenColor (const VGColor &inColor)
 
virtual void PopPenColor ()
 
virtual void PushPenWidth (float width)
 
virtual void PopPenWidth ()
 
virtual VGDeviceCreateDisplayDevice ()
 
virtual VGDeviceCreateMemoryDevice (int inWidth, int inHeight)
 
virtual VGDeviceCreateMemoryDevice (const char *inPath)
 
virtual VGDeviceCreatePrinterDevice ()
 
virtual VGDeviceCreateAntiAliasedMemoryDevice (int inWidth, int inHeight)
 
virtual const VGFontCreateVGFont (const char *faceName, int size, int properties) const
 
void writeString (const char *str) const
 
 BinaryDevice (std::ostream &outstream, BinarySystem *system)
 
virtual ~BinaryDevice ()
 
std::ostream & operator<< (std::ostream &os, const svgendl &eol)
 
void print (std::ostream &out, const VGColor &color) const
 
void printFont (std::ostream &out, const char *font) const
 
void getsvgfont (const char *ptr, std::string &str) const
 
float alpha2float (const VGColor &color) const
 
void selectfont (int font)
 
void checkfont ()
 
const char * align2str (int align) const
 
const char * baseline2str (int align) const
 
void putbase64 (VGDevice *pSrcDC) const
 
void closegroup ()
 
 SVGDevice (std::ostream &outstream, SVGSystem *system, const char *guidofont, bool setviewport=false)
 
virtual ~SVGDevice ()
 
virtual ~SVGSystem ()
 
virtual VGDeviceCreateDisplayDevice (std::ostream &outstream, int mappingMode)
 
std::ostream & operator<< (std::ostream &out, const VGColor &c)
 
VGColorVGColor::operator+= (short v)
 

Variables

class_export AbstractDevice
 An abstract drawing device, for use with higher level devices. outputs commands and their passed parameters represents images, colors and fonts via their important parameters more comments on this below. More...
 
std::ostream & fStream
 
std::string fSpace
 
int fWidth
 
int fHeight
 
const VGFontfMusicFont
 
const VGFontfTextFont
 
VRasterOpMode fOpMode
 
float fXScale
 
float fYScale
 
float fXOrigin
 
float fYOrigin
 
unsigned int fFontAlign
 
float fDPI
 
VGColor fFontColor
 
VGColor fFontBackgroundColor
 
class_export AbstractSystem
 
class_export BinaryDevice
 An abstract drawing device, for use with higher level devices. outputs commands and their passed parameters in a binary storage format. More...
 
std::ostream & fStream
 
int fWidth
 
int fHeight
 
const VGFontfMusicFont
 
const VGFontfTextFont
 
VRasterOpMode fOpMode
 
float fXScale
 
float fYScale
 
float fXOrigin
 
float fYOrigin
 
unsigned int fFontAlign
 
float fDPI
 
VGColor fFontColor
 
VGColor fFontBackgroundColor
 
class_export BinarySystem
 
class_export SVGDevice
 A SVG based drawing device. More...
 
const char * fGuidoFont
 
int fWidth
 
int fHeight
 
const VGFontfMusicFont
 
const VGFontfTextFont
 
VRasterOpMode fOpMode
 
float fXScale
 
float fYScale
 
float fXOrigin
 
float fYOrigin
 
float fXPos
 
float fYPos
 
VGColor fFontColor
 
VGColor fFontBackgroundColor
 
int fFontAlign
 
float fDPI
 
bool fViewPort
 
VGColorfPendingStrokeColor
 
VGColorfPendingFillColor
 
bool fBeginDone
 
std::ostream & fStream
 
svgendl fEndl
 
bool fPushedPen
 
bool fPushedPenColor
 
bool fPushedPenWidth
 
bool fPushedFill
 
bool fScaled
 
bool fOffset
 
int fCurrFont
 
class_export SVGSystem
 

Detailed Description

The virtual graphic system is intended as an abstract layer covering platform dependencies at graphic level. It represents a set of abstract classes covering the basic needs of an application: printing text, drawing to the screen or to an offscreen, etc... The set of abstract classes includes:

This set of classes is implemented for different target platforms: implementations are provided for Windows GDI and Mac OSX Quartz, implementations for Windows GDI+, OpenGL and Linux GTK are in progress.

Macro Definition Documentation

◆ ALPHA_OPAQUE

#define ALPHA_OPAQUE   255

◆ ALPHA_TRANSPARENT

#define ALPHA_TRANSPARENT   0

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kNoFont 
kMusicFont 
kTextFont 

◆ anonymous enum

anonymous enum
Enumerator
kSVGSizeDivider 

◆ TagType

enum TagType
Enumerator
penTag 
penWidthTag 
penColorTag 
fillColorTag 
fontTag 
scaleTag 
originTag 

Function Documentation

◆ AbstractDevice()

AbstractDevice ( std::ostream &  outstream,
AbstractSystem system 
)

◆ align2str()

const char* align2str ( int  align) const

◆ alpha2float()

float alpha2float ( const VGColor color) const

◆ Arc()

void Arc ( float  left,
float  top,
float  right,
float  bottom,
float  startX,
float  startY,
float  endX,
float  endY 
)
virtual

◆ baseline2str()

const char* baseline2str ( int  align) const

◆ BeginDraw()

bool BeginDraw ( )
virtual

◆ BinaryDevice()

BinaryDevice ( std::ostream &  outstream,
BinarySystem system 
)

◆ checkfont()

void checkfont ( )

◆ closegroup()

void closegroup ( )
protected

◆ CopyPixels() [1/4]

bool CopyPixels ( int  xDest,
int  yDest,
int  dstWidth,
int  dstHeight,
VGDevice pSrcDC,
float  alpha = -1.0 
)
virtual

◆ CopyPixels() [2/4]

bool CopyPixels ( int  xDest,
int  yDest,
int  dstWidth,
int  dstHeight,
VGDevice pSrcDC,
int  xSrc,
int  ySrc,
int  nSrcWidth,
int  nSrcHeight,
float  alpha = -1.0 
)
virtual

◆ CopyPixels() [3/4]

bool CopyPixels ( int  xDest,
int  yDest,
VGDevice pSrcDC,
int  xSrc,
int  ySrc,
int  nSrcWidth,
int  nSrcHeight,
float  alpha = -1.0 
)
virtual

◆ CopyPixels() [4/4]

bool CopyPixels ( VGDevice pSrcDC,
float  alpha = -1.0 
)
virtual

◆ CreateAntiAliasedMemoryDevice()

VGDevice * CreateAntiAliasedMemoryDevice ( int  inWidth,
int  inHeight 
)
virtual

◆ CreateDisplayDevice() [1/2]

VGDevice * CreateDisplayDevice ( )
virtual

◆ CreateDisplayDevice() [2/2]

virtual VGDevice* CreateDisplayDevice ( std::ostream &  outstream,
int  mappingMode 
)
virtual

◆ CreateMemoryDevice() [1/2]

VGDevice * CreateMemoryDevice ( const char *  inPath)
virtual

◆ CreateMemoryDevice() [2/2]

VGDevice * CreateMemoryDevice ( int  inWidth,
int  inHeight 
)
virtual

◆ CreatePrinterDevice()

VGDevice * CreatePrinterDevice ( )
virtual

◆ CreateVGFont()

const VGFont * CreateVGFont ( const char *  faceName,
int  size,
int  properties 
) const
virtual

◆ DeviceToLogical()

void DeviceToLogical ( float *  x,
float *  y 
) const
virtual

◆ DrawMusicSymbol()

void DrawMusicSymbol ( float  x,
float  y,
unsigned int  inSymbolID 
)
virtual

◆ DrawString()

void DrawString ( float  x,
float  y,
const char *  s,
int  inCharCount 
)
virtual

◆ Ellipse()

void Ellipse ( float  x,
float  y,
float  width,
float  height,
const VGColor color 
)
virtual

◆ EndDraw()

void EndDraw ( )
virtual

◆ Frame()

void Frame ( float  left,
float  top,
float  right,
float  bottom 
)
virtual

◆ FrameEllipse()

void FrameEllipse ( float  x,
float  y,
float  width,
float  height 
)
virtual

◆ GetBitMapPixels()

void * GetBitMapPixels ( )
virtual

◆ GetDPITag()

float GetDPITag ( ) const
virtual

◆ GetFontAlign()

unsigned int GetFontAlign ( ) const
virtual

◆ GetFontBackgroundColor()

VGColor GetFontBackgroundColor ( ) const
virtual

◆ GetFontColor()

VGColor GetFontColor ( ) const
virtual

◆ GetHeight()

int GetHeight ( ) const
virtual

◆ GetImageData()

const char * GetImageData ( const char *&  outDataPtr,
int &  outLength 
)
virtual

◆ GetMusicFont()

const VGFont * GetMusicFont ( ) const
virtual

◆ GetNativeContext()

void * GetNativeContext ( ) const
virtual

◆ GetRasterOpMode()

VRasterOpMode GetRasterOpMode ( ) const
virtual

◆ getsvgfont()

void getsvgfont ( const char *  ptr,
std::string &  str 
) const

◆ GetTextFont()

const VGFont * GetTextFont ( ) const
virtual

◆ getVGSystem()

VGSystem * getVGSystem ( ) const
virtual

temporary hack - must be removed asap

◆ GetWidth()

int GetWidth ( ) const
virtual

◆ GetXOrigin()

float GetXOrigin ( ) const
virtual

◆ GetXScale()

float GetXScale ( ) const
virtual

◆ GetYOrigin()

float GetYOrigin ( ) const
virtual

◆ GetYScale()

float GetYScale ( ) const
virtual

◆ InvalidateRect()

void InvalidateRect ( float  left,
float  top,
float  right,
float  bottom 
)
virtual

◆ IsValid()

bool IsValid ( ) const
virtual

Returns the ability of the current VGdevice to be drawn into.

◆ Line()

void Line ( float  x1,
float  y1,
float  x2,
float  y2 
)
virtual

◆ LineTo()

void LineTo ( float  x,
float  y 
)
virtual

◆ LogicalToDevice()

void LogicalToDevice ( float *  x,
float *  y 
) const
virtual

◆ MoveTo()

void MoveTo ( float  x,
float  y 
)
virtual

◆ NotifySize()

void NotifySize ( int  inWidth,
int  inHeight 
)
virtual

◆ OffsetOrigin()

void OffsetOrigin ( float  x,
float  y 
)
virtual

◆ operator+=()

VGColor & VGColor::operator+= ( short  v)
inline

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  os,
const svgendl eol 
)

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  out,
const VGColor c 
)
inline

◆ Polygon()

void Polygon ( const float *  xCoords,
const float *  yCoords,
int  count 
)
virtual

◆ PopFillColor()

void PopFillColor ( )
virtual

◆ PopPen()

void PopPen ( )
virtual

◆ PopPenColor()

void PopPenColor ( )
virtual

◆ PopPenWidth()

void PopPenWidth ( )
virtual

◆ print()

void print ( std::ostream &  out,
const VGColor color 
) const

◆ printFont()

void printFont ( std::ostream &  out,
const char *  font 
) const

◆ PushFillColor()

void PushFillColor ( const VGColor inColor)
virtual

◆ PushPen()

void PushPen ( const VGColor inColor,
float  inWidth 
)
virtual

◆ PushPenColor()

void PushPenColor ( const VGColor inColor)
virtual

◆ PushPenWidth()

void PushPenWidth ( float  width)
virtual

◆ putbase64()

void putbase64 ( VGDevice pSrcDC) const

◆ Rectangle()

void Rectangle ( float  left,
float  top,
float  right,
float  bottom 
)
virtual

◆ ReleaseBitMapPixels()

void ReleaseBitMapPixels ( )
virtual

◆ ReleaseImageData()

void ReleaseImageData ( const char *  ) const
virtual

◆ SelectFillColor()

void SelectFillColor ( const VGColor c)
virtual

◆ selectfont()

void selectfont ( int  font)

◆ SelectPen()

void SelectPen ( const VGColor inColor,
float  witdh 
)
virtual

◆ SelectPenColor()

void SelectPenColor ( const VGColor inColor)
virtual

◆ SelectPenWidth()

void SelectPenWidth ( float  witdh)
virtual

◆ SetDPITag()

void SetDPITag ( float  inDPI)
virtual

◆ SetFontAlign()

void SetFontAlign ( unsigned int  inAlign)
virtual

◆ SetFontBackgroundColor()

void SetFontBackgroundColor ( const VGColor inColor)
virtual

◆ SetFontColor()

void SetFontColor ( const VGColor inColor)
virtual

◆ SetMusicFont()

void SetMusicFont ( const VGFont font)
virtual

◆ SetOrigin()

void SetOrigin ( float  x,
float  y 
)
virtual

◆ SetRasterOpMode()

void SetRasterOpMode ( VRasterOpMode  ROpMode)
virtual

◆ SetScale()

void SetScale ( float  x,
float  y 
)
virtual

◆ SetTextFont()

void SetTextFont ( const VGFont font)
virtual

◆ SVGDevice()

SVGDevice ( std::ostream &  outstream,
SVGSystem system,
const char *  guidofont,
bool  setviewport = false 
)

◆ Triangle()

void Triangle ( float  x1,
float  y1,
float  x2,
float  y2,
float  x3,
float  y3 
)
virtual

◆ writeColor()

void writeColor ( const VGColor color) const

◆ writeFont()

void writeFont ( const VGFont font) const

◆ writeFormattedImage()

void writeFormattedImage ( VGDevice pSrcDC) const

◆ writeRasterOpModeToString()

void writeRasterOpModeToString ( VRasterOpMode  mode) const

◆ writeString()

void writeString ( const char *  str) const

◆ ~AbstractDevice()

virtual ~AbstractDevice ( )
virtual

◆ ~BinaryDevice()

virtual ~BinaryDevice ( )
virtual

◆ ~SVGDevice()

virtual ~SVGDevice ( )
virtual

◆ ~SVGSystem()

virtual ~SVGSystem ( )
virtual

Variable Documentation

◆ AbstractDevice

class_export AbstractDevice

An abstract drawing device, for use with higher level devices. outputs commands and their passed parameters represents images, colors and fonts via their important parameters more comments on this below.

◆ AbstractSystem

class_export AbstractSystem

◆ BinaryDevice

class_export BinaryDevice

An abstract drawing device, for use with higher level devices. outputs commands and their passed parameters in a binary storage format.

◆ BinarySystem

class_export BinarySystem

◆ fBeginDone

bool fBeginDone

◆ fCurrFont

int fCurrFont
protected

◆ fDPI [1/3]

float fDPI

◆ fDPI [2/3]

float fDPI

◆ fDPI [3/3]

float fDPI

◆ fEndl

svgendl fEndl
protected

◆ fFontAlign [1/3]

unsigned int fFontAlign

◆ fFontAlign [2/3]

unsigned int fFontAlign

◆ fFontAlign [3/3]

int fFontAlign

◆ fFontBackgroundColor [1/3]

VGColor fFontBackgroundColor

◆ fFontBackgroundColor [2/3]

VGColor fFontBackgroundColor

◆ fFontBackgroundColor [3/3]

VGColor fFontBackgroundColor

◆ fFontColor [1/3]

VGColor fFontColor

◆ fFontColor [2/3]

VGColor fFontColor

◆ fFontColor [3/3]

VGColor fFontColor

◆ fGuidoFont

const char* fGuidoFont

◆ fHeight [1/3]

int fHeight

◆ fHeight [2/3]

int fHeight

◆ fHeight [3/3]

int fHeight

◆ fMusicFont [1/3]

const VGFont* fMusicFont

◆ fMusicFont [2/3]

const VGFont* fMusicFont

◆ fMusicFont [3/3]

const VGFont* fMusicFont

◆ fOffset

bool fOffset
protected

◆ fOpMode [1/3]

VRasterOpMode fOpMode

◆ fOpMode [2/3]

VRasterOpMode fOpMode

◆ fOpMode [3/3]

VRasterOpMode fOpMode

◆ fPendingFillColor

VGColor* fPendingFillColor

◆ fPendingStrokeColor

VGColor* fPendingStrokeColor

◆ fPushedFill

bool fPushedFill
protected

◆ fPushedPen

bool fPushedPen
protected

◆ fPushedPenColor

bool fPushedPenColor
protected

◆ fPushedPenWidth

bool fPushedPenWidth
protected

◆ fScaled

bool fScaled
protected

◆ fSpace

std::string fSpace

◆ fStream [1/3]

std::ostream& fStream

◆ fStream [2/3]

std::ostream& fStream

◆ fStream [3/3]

std::ostream& fStream
protected

◆ fTextFont [1/3]

const VGFont* fTextFont

◆ fTextFont [2/3]

const VGFont* fTextFont

◆ fTextFont [3/3]

const VGFont* fTextFont

◆ fViewPort

bool fViewPort

◆ fWidth [1/3]

int fWidth

◆ fWidth [2/3]

int fWidth

◆ fWidth [3/3]

int fWidth

◆ fXOrigin [1/3]

float fXOrigin

◆ fXOrigin [2/3]

float fXOrigin

◆ fXOrigin [3/3]

float fXOrigin

◆ fXPos

float fXPos

◆ fXScale [1/3]

float fXScale

◆ fXScale [2/3]

float fXScale

◆ fXScale [3/3]

float fXScale

◆ fYOrigin [1/3]

float fYOrigin

◆ fYOrigin [2/3]

float fYOrigin

◆ fYOrigin [3/3]

float fYOrigin

◆ fYPos

float fYPos

◆ fYScale [1/3]

float fYScale

◆ fYScale [2/3]

float fYScale

◆ fYScale [3/3]

float fYScale

◆ SVGDevice

class_export SVGDevice

A SVG based drawing device.

◆ SVGSystem

class_export SVGSystem

Guido Project Copyright © 2019 Grame-CNCM