X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FPainterBase.h;h=bd9832925616f2f68b9eb265d67d02f7f5907d25;hb=c90c5e6386ce69c34c99b3594d6fa452e6a13161;hp=22f3a0782b0539b5b478962f2815c7c8523b9735;hpb=6bba977f42b0cde753ac2ffd26f3f9c6b32ba0b6;p=lyx.git diff --git a/src/PainterBase.h b/src/PainterBase.h index 22f3a0782b..bd98329256 100644 --- a/src/PainterBase.h +++ b/src/PainterBase.h @@ -20,6 +20,7 @@ class WorkArea; class LyXFont; +class LyXImage; /** A painter class to encapsulate all graphics parameters and operations @@ -35,7 +36,11 @@ class LyXFont; class PainterBase { protected: /// - static int dummy1, dummy2, dummy3; + static int dummy1; + /// + static int dummy2; + /// + static int dummy3; public: /// enum line_width { @@ -61,7 +66,7 @@ public: /// virtual ~PainterBase() {} - /** Screen geometry */ + /* Screen geometry */ /// int paperMargin() const; /// @@ -69,7 +74,6 @@ public: /// int paperHeight() const; - /**@Basic drawing routines */ /// Draw a line from point to point virtual PainterBase & line( int x1, int y1, int x2, int y2, @@ -90,7 +94,7 @@ public: virtual PainterBase & fillPolygon( int const * xp, int const * yp, int np, - LColor::color =LColor::foreground) = 0; + LColor::color = LColor::foreground) = 0; /// Draw lines from x1,y1 to x2,y2. They are arrays virtual PainterBase & segments( @@ -141,23 +145,18 @@ public: /// virtual PainterBase & buttonFrame(int x, int y, int w, int h); - /**@Image stuff */ - /// For the figure inset - // This can't be part of the base since we don't know what window - // system we will be useing, or if are going to use pixmaps at all. - //virtual PainterBase & pixmap(int x, int y, Pixmap bitmap)=0; + // For the figure inset + virtual PainterBase & image(int x, int y, int w, int h, LyXImage const * image) = 0; - /**@String functions */ - /// Draw a string at position x, y (y is the baseline) virtual PainterBase & text(int x, int y, - string const &str, LyXFont const & f) = 0; + string const & str, LyXFont const & f) = 0; /** Draw a string at position x, y (y is the baseline) This is just for fast drawing */ - virtual PainterBase & text(int x, int y, char const * str, int l, + virtual PainterBase & text(int x, int y, char const * str, size_t l, LyXFont const & f) = 0; /// Draw a char at position x, y (y is the baseline) @@ -184,6 +183,7 @@ public: int & ascent = PainterBase::dummy2, int & descent = PainterBase::dummy3); protected: + /// WorkArea & owner; };