Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GraphicDevice Class Reference

#include </home/clem/local/src/opie/core/multimedia/opieplayer/libflash/graphic.h>

Inheritance diagram for GraphicDevice:

Inheritance graph
[legend]
Collaboration diagram for GraphicDevice:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GraphicDevice (FlashDisplay *fd)
virtual ~GraphicDevice ()
int setBackgroundColor (Color)
void setForegroundColor (Color)
Color getBackgroundColor ()
Color getForegroundColor ()
void setMovieDimension (long width, long height)
void setMovieZoom (int zoom)
void setMovieOffset (long x, long y)
long getWidth ()
long getHeight ()
ColorgetColormap (Color *old, long n, Cxform *cxform)
void drawBox (long x1, long y1, long x2, long y2)
void addSegment (long x1, long y1, long x2, long y2, FillStyleDef *f0, FillStyleDef *f1, int aa)
void drawPolygon (void)
void updateClippingRegion (Rect *)
void setClipping (int)
virtual void clearCanvas ()
virtual long allocColor (Color color)
virtual void fillLineBitmap (FillStyleDef *f, long y, long start, long end)
virtual void fillLineLG (Gradient *grad, long y, long start, long end)
virtual void fillLineRG (Gradient *grad, long y, long start, long end)
virtual void fillLine (FillStyleDef *f, long y, long start, long end)
virtual void fillLineAA (FillStyleDef *f, long y, long start, long end)
virtual void drawLine (long x1, long y1, long x2, long y2, long width)

Public Attributes

FlashDisplayflashDisplay
int bgInitialized
Color backgroundColor
Color foregroundColor
void * scan_line_func_id
ScanLineFunc scan_line_func
Rect clip_rect
Matrixadjust
long showMore
unsigned char * canvasBuffer
long bpl
long bpp
long pad

Protected Member Functions

long clip (long &y, long &start, long &end)

Private Member Functions

SegmentallocSeg ()
SegmentprogressSegments (Segment *curSegs, long y)
SegmentnewSegments (Segment *curSegs, Segment *newSegs)
void renderScanLine (long y, Segment *curSegs)

Private Attributes

int targetWidth
int targetHeight
Rect viewPort
int movieWidth
int movieHeight
int zoom
unsigned long redMask
unsigned long greenMask
unsigned long blueMask
int clipping
Segment ** segs
int ymin
int ymax
int height
Segmentseg_pool
Segmentseg_pool_cur

Constructor & Destructor Documentation

GraphicDevice::GraphicDevice FlashDisplay fd  ) 
 

Definition at line 33 of file graphic.cc.

References adjust, Color::alpha, ALPHA_OPAQUE, backgroundColor, bgInitialized, Color::blue, blueMask, FlashDisplay::bpl, bpl, canvasBuffer, FlashDisplay::flash_refresh, flashDisplay, foregroundColor, FRAC, Color::green, greenMask, height, FlashDisplay::height, movieHeight, movieWidth, NB_SEGMENT_MAX, FlashDisplay::pixels, printf, Color::red, redMask, seg_pool, seg_pool_cur, segs, setClipping(), showMore, targetHeight, targetWidth, viewPort, FlashDisplay::width, Rect::xmax, Rect::xmin, ymax, Rect::ymax, ymin, Rect::ymin, and zoom.

GraphicDevice::~GraphicDevice  )  [virtual]
 

Definition at line 96 of file graphic.cc.

References adjust, seg_pool, and segs.


Member Function Documentation

void GraphicDevice::addSegment long  x1,
long  y1,
long  x2,
long  y2,
FillStyleDef f0,
FillStyleDef f1,
int  aa
 

Definition at line 270 of file graphic.cc.

References Segment::aa, allocSeg(), clip_rect, Segment::dX, FRAC, FRAC_BITS, Segment::fs, height, Segment::next, Segment::nextValid, NULL, s, SEGFRAC, segs, Segment::X, X, Segment::x1, Segment::x2, Segment::ymax, Rect::ymax, ymax, Rect::ymin, and ymin.

Referenced by flushPaths().

long GraphicDevice::allocColor Color  color  )  [virtual]
 

Reimplemented in GraphicDevice16, GraphicDevice24, and GraphicDevice32.

Definition at line 599 of file graphic.cc.

Referenced by Shape::execute(), getColormap(), ParseLineStyle(), and prepareStyles().

Segment * GraphicDevice::allocSeg  )  [inline, private]
 

Definition at line 257 of file graphic.cc.

References NB_SEGMENT_MAX, NULL, seg_pool, and seg_pool_cur.

Referenced by addSegment().

void GraphicDevice::clearCanvas  )  [virtual]
 

Reimplemented in GraphicDevice16, GraphicDevice24, and GraphicDevice32.

Definition at line 594 of file graphic.cc.

Referenced by FlashMovie::renderMovie(), and setBackgroundColor().

long GraphicDevice::clip long &  y,
long &  start,
long &  end
[protected]
 

Definition at line 221 of file graphic.cc.

References clip_rect, FRAC, Rect::xmax, Rect::xmin, Rect::ymax, and Rect::ymin.

Referenced by GraphicDevice32::fillLine(), GraphicDevice24::fillLine(), GraphicDevice16::fillLine(), GraphicDevice32::fillLineAA(), GraphicDevice24::fillLineAA(), GraphicDevice16::fillLineAA(), GraphicDevice32::fillLineBitmap(), GraphicDevice24::fillLineBitmap(), GraphicDevice16::fillLineBitmap(), GraphicDevice32::fillLineLG(), GraphicDevice24::fillLineLG(), GraphicDevice16::fillLineLG(), GraphicDevice32::fillLineRG(), GraphicDevice24::fillLineRG(), and GraphicDevice16::fillLineRG().

void GraphicDevice::drawBox long  x1,
long  y1,
long  x2,
long  y2
 

Definition at line 241 of file graphic.cc.

References drawLine(), FRAC, and i.

Referenced by FlashMovie::renderFocus().

void GraphicDevice::drawLine long  x1,
long  y1,
long  x2,
long  y2,
long  width
[virtual]
 

Reimplemented in GraphicDevice16, GraphicDevice24, and GraphicDevice32.

Definition at line 630 of file graphic.cc.

Referenced by Text::doText(), drawBox(), flushPaths(), and DisplayList::render().

void GraphicDevice::drawPolygon void   ) 
 

Definition at line 511 of file graphic.cc.

References height, newSegments(), Segment::nextValid, NULL, progressSegments(), renderScanLine(), scan_line_func, seg_pool, seg_pool_cur, SEGFRAC, Segment::X, Opie::MM::y, ymax, and ymin.

Referenced by flushPaths().

void GraphicDevice::fillLine FillStyleDef f,
long  y,
long  start,
long  end
[virtual]
 

Reimplemented in GraphicDevice16, GraphicDevice24, and GraphicDevice32.

Definition at line 620 of file graphic.cc.

Referenced by renderScanLine().

void GraphicDevice::fillLineAA FillStyleDef f,
long  y,
long  start,
long  end
[virtual]
 

Reimplemented in GraphicDevice16, GraphicDevice24, and GraphicDevice32.

Definition at line 625 of file graphic.cc.

Referenced by renderScanLine().

void GraphicDevice::fillLineBitmap FillStyleDef f,
long  y,
long  start,
long  end
[virtual]
 

Reimplemented in GraphicDevice16, GraphicDevice24, and GraphicDevice32.

Definition at line 605 of file graphic.cc.

Referenced by renderScanLine().

void GraphicDevice::fillLineLG Gradient grad,
long  y,
long  start,
long  end
[virtual]
 

Reimplemented in GraphicDevice16, GraphicDevice24, and GraphicDevice32.

Definition at line 610 of file graphic.cc.

Referenced by renderScanLine().

void GraphicDevice::fillLineRG Gradient grad,
long  y,
long  start,
long  end
[virtual]
 

Reimplemented in GraphicDevice16, GraphicDevice24, and GraphicDevice32.

Definition at line 615 of file graphic.cc.

Referenced by renderScanLine().

Color GraphicDevice::getBackgroundColor  ) 
 

Definition at line 156 of file graphic.cc.

References backgroundColor.

Color * GraphicDevice::getColormap Color old,
long  n,
Cxform cxform
 

Definition at line 107 of file graphic.cc.

References allocColor(), i, NULL, and Color::pixel.

Referenced by prepareStyles().

Color GraphicDevice::getForegroundColor  ) 
 

Definition at line 144 of file graphic.cc.

References foregroundColor.

Referenced by Shape::execute().

long GraphicDevice::getHeight  ) 
 

Definition at line 132 of file graphic.cc.

References targetHeight.

long GraphicDevice::getWidth  ) 
 

Definition at line 138 of file graphic.cc.

References targetWidth.

Segment * GraphicDevice::newSegments Segment curSegs,
Segment newSegs
[inline, private]
 

Definition at line 400 of file graphic.cc.

References Segment::dX, Segment::next, Segment::nextValid, s, Segment::X, Segment::x1, and Segment::x2.

Referenced by drawPolygon().

Segment * GraphicDevice::progressSegments Segment curSegs,
long  y
[inline, private]
 

Definition at line 373 of file graphic.cc.

References Segment::dX, FRAC, Segment::nextValid, Segment::X, and Segment::ymax.

Referenced by drawPolygon().

void GraphicDevice::renderScanLine long  y,
Segment curSegs
[inline, private]
 

Definition at line 466 of file graphic.cc.

References Segment::aa, f, f_clippedBitmap, f_LinearGradient, f_None, f_RadialGradient, f_Solid, f_TiledBitmap, fillLine(), fillLineAA(), fillLineBitmap(), fillLineLG(), fillLineRG(), FRAC, Segment::fs, Segment::nextValid, SEGFRAC, targetWidth, width, and Segment::X.

Referenced by drawPolygon().

int GraphicDevice::setBackgroundColor Color   ) 
 

Definition at line 162 of file graphic.cc.

References backgroundColor, bgInitialized, and clearCanvas().

void GraphicDevice::setClipping int   ) 
 

Definition at line 580 of file graphic.cc.

References clip_rect, clipping, viewPort, Rect::xmax, Rect::xmin, Rect::ymax, and Rect::ymin.

Referenced by Shape::getRegion(), and GraphicDevice().

void GraphicDevice::setForegroundColor Color   ) 
 

Definition at line 150 of file graphic.cc.

References foregroundColor.

Referenced by Text::doText(), flushPaths(), and DisplayList::render().

void GraphicDevice::setMovieDimension long  width,
long  height
 

Definition at line 174 of file graphic.cc.

References Matrix::a, adjust, Matrix::d, movieHeight, movieWidth, targetHeight, targetWidth, Matrix::tx, Matrix::ty, viewPort, Rect::xmax, Rect::xmin, Rect::ymax, Rect::ymin, and zoom.

Referenced by FlashGraphicInit(), and setMovieZoom().

void GraphicDevice::setMovieOffset long  x,
long  y
 

Definition at line 214 of file graphic.cc.

References adjust, Matrix::tx, Matrix::ty, and zoom.

Referenced by FlashOffset().

void GraphicDevice::setMovieZoom int  zoom  ) 
 

Definition at line 205 of file graphic.cc.

References FRAC, movieHeight, movieWidth, setMovieDimension(), and zoom.

Referenced by FlashZoom().

void GraphicDevice::updateClippingRegion Rect  ) 
 

Definition at line 553 of file graphic.cc.

References adjust, clip_rect, clipping, FRAC_BITS, transformBoundingBox(), viewPort, Rect::xmax, Rect::xmin, Rect::ymax, and Rect::ymin.

Referenced by FlashMovie::renderMovie().


Member Data Documentation

Matrix* GraphicDevice::adjust
 

Definition at line 126 of file graphic.h.

Referenced by button_hit(), Text::doText(), drawShape(), GraphicDevice(), DisplayList::render(), FlashMovie::renderFocus(), setMovieDimension(), setMovieOffset(), updateClippingRegion(), and ~GraphicDevice().

Color GraphicDevice::backgroundColor
 

Definition at line 102 of file graphic.h.

Referenced by GraphicDevice32::clearCanvas(), GraphicDevice24::clearCanvas(), GraphicDevice16::clearCanvas(), getBackgroundColor(), GraphicDevice(), and setBackgroundColor().

int GraphicDevice::bgInitialized
 

Definition at line 101 of file graphic.h.

Referenced by GraphicDevice32::clearCanvas(), GraphicDevice24::clearCanvas(), GraphicDevice16::clearCanvas(), GraphicDevice(), and setBackgroundColor().

unsigned long GraphicDevice::blueMask [private]
 

Definition at line 96 of file graphic.h.

Referenced by GraphicDevice().

long GraphicDevice::bpl
 

Definition at line 132 of file graphic.h.

Referenced by GraphicDevice32::clearCanvas(), GraphicDevice24::clearCanvas(), GraphicDevice16::clearCanvas(), GraphicDevice32::drawLine(), GraphicDevice24::drawLine(), GraphicDevice16::drawLine(), GraphicDevice32::fillLine(), GraphicDevice24::fillLine(), GraphicDevice16::fillLine(), GraphicDevice32::fillLineAA(), GraphicDevice24::fillLineAA(), GraphicDevice16::fillLineAA(), GraphicDevice32::fillLineBitmap(), GraphicDevice24::fillLineBitmap(), GraphicDevice16::fillLineBitmap(), GraphicDevice32::fillLineLG(), GraphicDevice24::fillLineLG(), GraphicDevice16::fillLineLG(), GraphicDevice32::fillLineRG(), GraphicDevice24::fillLineRG(), GraphicDevice16::fillLineRG(), and GraphicDevice().

long GraphicDevice::bpp
 

Definition at line 133 of file graphic.h.

unsigned char* GraphicDevice::canvasBuffer
 

Definition at line 131 of file graphic.h.

Referenced by GraphicDevice32::clearCanvas(), GraphicDevice24::clearCanvas(), GraphicDevice16::clearCanvas(), GraphicDevice32::drawLine(), GraphicDevice24::drawLine(), GraphicDevice16::drawLine(), GraphicDevice32::fillLine(), GraphicDevice24::fillLine(), GraphicDevice16::fillLine(), GraphicDevice32::fillLineAA(), GraphicDevice24::fillLineAA(), GraphicDevice16::fillLineAA(), GraphicDevice32::fillLineBitmap(), GraphicDevice24::fillLineBitmap(), GraphicDevice16::fillLineBitmap(), GraphicDevice32::fillLineLG(), GraphicDevice24::fillLineLG(), GraphicDevice16::fillLineLG(), GraphicDevice32::fillLineRG(), GraphicDevice24::fillLineRG(), GraphicDevice16::fillLineRG(), and GraphicDevice().

Rect GraphicDevice::clip_rect
 

Definition at line 108 of file graphic.h.

Referenced by addSegment(), GraphicDevice32::clearCanvas(), GraphicDevice24::clearCanvas(), GraphicDevice16::clearCanvas(), clip(), GraphicDevice32::drawLine(), GraphicDevice24::drawLine(), GraphicDevice16::drawLine(), DisplayList::render(), setClipping(), and updateClippingRegion().

int GraphicDevice::clipping [private]
 

Definition at line 97 of file graphic.h.

Referenced by setClipping(), and updateClippingRegion().

FlashDisplay* GraphicDevice::flashDisplay
 

Definition at line 100 of file graphic.h.

Referenced by GraphicDevice32::clearCanvas(), GraphicDevice24::clearCanvas(), GraphicDevice16::clearCanvas(), and GraphicDevice().

Color GraphicDevice::foregroundColor
 

Definition at line 103 of file graphic.h.

Referenced by GraphicDevice32::drawLine(), GraphicDevice24::drawLine(), GraphicDevice16::drawLine(), getForegroundColor(), GraphicDevice(), and setForegroundColor().

unsigned long GraphicDevice::greenMask [private]
 

Definition at line 95 of file graphic.h.

Referenced by GraphicDevice().

int GraphicDevice::height [private]
 

Definition at line 113 of file graphic.h.

Referenced by addSegment(), drawPolygon(), and GraphicDevice().

int GraphicDevice::movieHeight [private]
 

Definition at line 92 of file graphic.h.

Referenced by GraphicDevice(), setMovieDimension(), and setMovieZoom().

int GraphicDevice::movieWidth [private]
 

Definition at line 91 of file graphic.h.

Referenced by GraphicDevice(), setMovieDimension(), and setMovieZoom().

long GraphicDevice::pad
 

Definition at line 134 of file graphic.h.

unsigned long GraphicDevice::redMask [private]
 

Definition at line 94 of file graphic.h.

Referenced by GraphicDevice().

ScanLineFunc GraphicDevice::scan_line_func
 

Definition at line 107 of file graphic.h.

Referenced by drawPolygon(), drawShape(), and flushPaths().

void* GraphicDevice::scan_line_func_id
 

Definition at line 106 of file graphic.h.

Referenced by drawShape().

Segment* GraphicDevice::seg_pool [private]
 

Definition at line 114 of file graphic.h.

Referenced by allocSeg(), drawPolygon(), GraphicDevice(), and ~GraphicDevice().

Segment* GraphicDevice::seg_pool_cur [private]
 

Definition at line 115 of file graphic.h.

Referenced by allocSeg(), drawPolygon(), and GraphicDevice().

Segment** GraphicDevice::segs [private]
 

Definition at line 111 of file graphic.h.

Referenced by addSegment(), GraphicDevice(), and ~GraphicDevice().

long GraphicDevice::showMore
 

Definition at line 128 of file graphic.h.

Referenced by Text::doText(), and GraphicDevice().

int GraphicDevice::targetHeight [private]
 

Definition at line 89 of file graphic.h.

Referenced by getHeight(), GraphicDevice(), and setMovieDimension().

int GraphicDevice::targetWidth [private]
 

Definition at line 88 of file graphic.h.

Referenced by getWidth(), GraphicDevice(), renderScanLine(), and setMovieDimension().

Rect GraphicDevice::viewPort [private]
 

Definition at line 90 of file graphic.h.

Referenced by GraphicDevice(), setClipping(), setMovieDimension(), and updateClippingRegion().

int GraphicDevice::ymax [private]
 

Definition at line 112 of file graphic.h.

Referenced by addSegment(), drawPolygon(), and GraphicDevice().

int GraphicDevice::ymin [private]
 

Definition at line 112 of file graphic.h.

Referenced by addSegment(), drawPolygon(), and GraphicDevice().

int GraphicDevice::zoom [private]
 

Definition at line 93 of file graphic.h.

Referenced by GraphicDevice(), setMovieDimension(), setMovieOffset(), and setMovieZoom().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:34:23 2005 for OPIE by  doxygen 1.4.2