[Scummvm-cvs-logs] SF.net SVN: scummvm: [32576] scummvm/branches/gsoc2008-gui/graphics/ VectorRenderer.h
Tanoku at users.sourceforge.net
Tanoku at users.sourceforge.net
Fri Jun 6 15:38:54 CEST 2008
Revision: 32576
http://scummvm.svn.sourceforge.net/scummvm/?rev=32576&view=rev
Author: Tanoku
Date: 2008-06-06 06:38:44 -0700 (Fri, 06 Jun 2008)
Log Message:
-----------
Documentation update.
More drawing steps.
Modified Paths:
--------------
scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h
Modified: scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h
===================================================================
--- scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h 2008-06-06 13:34:34 UTC (rev 32575)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h 2008-06-06 13:38:44 UTC (rev 32576)
@@ -51,6 +51,7 @@
uint8 shadow, stroke, factor; /** Misc options... */
int fill_mode; /** active fill mode */
+ int extra; /** Generic parameter for extra options */
void (VectorRenderer::*drawing_call)(DrawStep*); /** Pointer to drawing function */
@@ -145,7 +146,30 @@
*/
virtual void drawRoundedSquare(int x, int y, int r, int w, int h) = 0;
+ /**
+ * Draws a triangle starting at (x,y) with the given base and height.
+ * The triangle will always be isosceles, with the given base and height.
+ * The orientation parameter controls the position of the base of the triangle.
+ *
+ * @param x Horizontal (X) coordinate for the top left corner of the triangle
+ * @param y Vertical (Y) coordinate for the top left corner of the triangle
+ * @param base Width of the base of the triangle
+ * @param h Height of the triangle
+ * @param orient Orientation of the triangle.
+ */
virtual void drawTriangle(int x, int y, int base, int height, TriangleOrientation orient) = 0;
+
+ /**
+ * Draws a beveled square like the ones in the Classic GUI themes.
+ * Beveled squares are always drawn with a transparent background. Draw them on top
+ * of a standard square to fill it.
+ *
+ * @param x Horizontal (X) coordinate for the center of the square
+ * @param y Vertical (Y) coordinate for the center of the square
+ * @param w Width of the square.
+ * @param h Height of the square
+ * @param bevel Amount of bevel. Must be positive.
+ */
virtual void drawBeveledSquare(int x, int y, int w, int h, int bevel) = 0;
/**
@@ -289,6 +313,9 @@
_gradientFactor = factor;
}
+ /**
+ * DrawStep callback functions for each drawing feature
+ */
void drawCallback_CIRCLE(DrawStep *step) {
drawCircle(step->x, step->y, step->r);
}
@@ -309,8 +336,27 @@
fillSurface();
}
+ void drawCallback_TRIANGLE(DrawStep *step) {
+ drawTriangle(step->x, step->y, step->w, step->h, (TriangleOrientation)step->extra);
+ }
+
+ void drawCallback_BEVELSQ(DrawStep *step) {
+ drawBeveledSquare(step->x, step->y, step->w, step->h, step->extra);
+ }
+
+ /**
+ * Draws the specified draw step on the screen.
+ *
+ * @see DrawStep
+ * @param step Pointer to a DrawStep struct.
+ */
virtual void drawStep(DrawStep *step);
+ /**
+ * Copies the current surface to the system overlay
+ *
+ * @param sys Pointer to the global System class
+ */
virtual void copyFrame(OSystem *sys) = 0;
protected:
@@ -427,6 +473,9 @@
}
}
+ /**
+ * @see VectorRenderer::copyFrame()
+ */
virtual void copyFrame(OSystem *sys) {
#ifdef OVERLAY_MULTIPLE_DEPTHS
sys->copyRectToOverlay((const PixelType*)_activeSurface->getBasePtr(0, 0),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list