From cb902eebe3b419e77599fe669bc0cbeb3bce104a Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 7 Feb 2011 13:49:34 +0000 Subject: Replaced global variable fl_fontsize by fl_graphics_driver->font_descriptor(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8395 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Device.H | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index 705d17be1..6569a8720 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -4,7 +4,7 @@ // Definition of classes Fl_Device, Fl_Graphics_Driver, Fl_Surface_Device, Fl_Display_Device // for the Fast Light Tool Kit (FLTK). // -// Copyright 2010 by Bill Spitzak and others. +// Copyright 2010-2011 by Bill Spitzak and others. // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -41,6 +41,7 @@ #include class Fl_Graphics_Driver; +class Fl_Font_Descriptor; /** \brief Points to the driver that currently receives all graphics requests */ FL_EXPORT extern Fl_Graphics_Driver *fl_graphics_driver; @@ -129,6 +130,7 @@ class FL_EXPORT Fl_Graphics_Driver : public Fl_Device { int numcount; int counts[20]; #endif + Fl_Font_Descriptor *font_descriptor_; void transformed_vertex0(COORD_T x, COORD_T y); void fixloop(); @@ -357,6 +359,10 @@ public: Fl_Fontsize size() {return size_; } /** \brief see fl_color(void). */ Fl_Color color() {return color_;} + /** Returns a pointer to the current Fl_Font_Descriptor for the graphics driver */ + inline Fl_Font_Descriptor *font_descriptor() { return font_descriptor_;} + /** Sets the current Fl_Font_Descriptor for the graphics driver */ + inline void font_descriptor(Fl_Font_Descriptor *d) { font_descriptor_ = d;} /** \brief The destructor */ virtual ~Fl_Graphics_Driver() {}; }; -- cgit v1.2.3