Author: manolo
Date: 2012-05-02 07:04:25 -0700 (Wed, 02 May 2012)
New Revision: 9428
Log:
Added fltk3::GraphicsDriver::vertex_kind() accessor function useful when
writing new graphics drivers.
Modified:
branches/branch-3.0/include/fltk3/Device.h
Modified: branches/branch-3.0/include/fltk3/Device.h
===================================================================
--- branches/branch-3.0/include/fltk3/Device.h 2012-05-02 13:44:52 UTC (rev
9427)
+++ branches/branch-3.0/include/fltk3/Device.h 2012-05-02 14:04:25 UTC (rev
9428)
@@ -58,6 +58,7 @@
extern void gl_start();
+class Fl_Graphics_Driver;
class Fl_Font_Descriptor;
class Fl_Surface_Device;
@@ -91,6 +92,7 @@
*/
class FLTK3_EXPORT GraphicsDriver : public Object {
friend void ::gl_start();
+ friend class ::Fl_Graphics_Driver;
public:
/** A 2D coordinate transformation matrix
*/
@@ -113,12 +115,13 @@
enum { region_stack_max = REGION_STACK_SIZE - 1 };
fltk3::Region rstack[REGION_STACK_SIZE];
Fl_Font_Descriptor *font_descriptor_;
+ int n, p_size, gap_;
+ XPOINT *p;
+ int what;
protected:
#ifndef FLTK3_DOXYGEN
- int n, p_size, gap_;
- XPOINT *p;
enum {LINE, LOOP, POLYGON, POINT_};
- int what;
+ inline int vertex_kind() {return what;}
int fl_clip_state_number;
void prepare_circle(double x, double y, double r, int& llx, int& lly, int&
w, int& h, double& xt, double& yt);
void fixloop();
@@ -130,11 +133,11 @@
matrix *fl_matrix; /**< Points to the current coordinate transformation
matrix */
/** Gives the number of vertices in the current path.
- Useful when writing Fl_Graphics_Driver subclasses.
+ Useful when writing fltk3::GraphicsDriver subclasses.
*/
int vertex_no() { return n; }
/** Array of vertices in the current path.
- Useful when writing Fl_Graphics_Driver subclasses. XPOINT is a
system-dependent type.
+ Useful when writing fltk3::GraphicsDriver subclasses. XPOINT is a
system-dependent type.
*/
XPOINT *vertices() { return p; }
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit