diff --git a/src/style.h b/src/style.h
index f1b5ec534cb622263372bb439e22cc174e8c15b4..b4663e8f6c043cb86434eafb514e9a08306611a6 100644 (file)
--- a/src/style.h
+++ b/src/style.h
class SPILength;
class SPIPaint;
class SPIFontSize;
+class SPIBaselineShift;
/// Float type internal to SPStyle.
struct SPIFloat {
#define SP_STYLE_FILL_SERVER(s) (((SPStyle *) (s))->getFillPaintServer())
#define SP_STYLE_STROKE_SERVER(s) (((SPStyle *) (s))->getStrokePaintServer())
-#define SP_OBJECT_STYLE_FILL_SERVER(o) (SP_OBJECT (o)->style->getFillPaintServer())
-#define SP_OBJECT_STYLE_STROKE_SERVER(o) (SP_OBJECT (o)->style->getStrokePaintServer())
class SVGICCColor;
SPColor color;
} value;
+ SPIPaint();
bool isSet() const { return true; /* set || colorSet*/}
bool isSameType( SPIPaint const & other ) const {return (isPaintserver() == other.isPaintserver()) && (colorSet == other.colorSet) && (currentcolor == other.currentcolor);}
void setColor( float r, float g, float b ) {value.color.set( r, g, b ); colorSet = true;}
void setColor( guint32 val ) {value.color.set( val ); colorSet = true;}
void setColor( SPColor const& color ) {value.color = color; colorSet = true;}
+
+ void read( gchar const *str, SPStyle &tyle, SPDocument *document = 0);
+
+ // Win32 is a temp work-around until the emf extension is fixed:
+#ifndef WIN32
+private:
+ SPIPaint(SPIPaint const&);
+ SPIPaint &operator=(SPIPaint const &);
+#endif // WIN32
};
/// Filter type internal to SPStyle
SP_FONT_SIZE_PERCENTAGE
};
+enum {
+ SP_BASELINE_SHIFT_LITERAL,
+ SP_BASELINE_SHIFT_LENGTH,
+ SP_BASELINE_SHIFT_PERCENTAGE
+};
+
#define SP_FONT_SIZE ((1 << 24) - 1)
#define SP_F8_16_TO_FLOAT(v) ((gdouble) (v) / (1 << 16))
float computed;
};
+/// Baseline shift type internal to SPStyle.
+struct SPIBaselineShift {
+ unsigned set : 1;
+ unsigned inherit : 1;
+ unsigned type : 2;
+ unsigned unit : 4;
+ unsigned literal: 2;
+ float value; // Can be negative
+ float computed;
+};
+
/// Text decoration type internal to SPStyle.
struct SPITextDecoration {
unsigned set : 1;
SPIEnum block_progression;
/** Writing mode (css3 text 3.2 and svg1.1 10.7.2) */
SPIEnum writing_mode;
+ /** Baseline shift (svg1.1 10.9.2) */
+ SPIBaselineShift baseline_shift;
/* SVG */
/** Anchor of the text (svg1.1 10.9.1) */
SP_CSS_TEXT_ANCHOR_END
};
+enum SPCSSBaselineShift {
+ SP_CSS_BASELINE_SHIFT_BASELINE,
+ SP_CSS_BASELINE_SHIFT_SUB,
+ SP_CSS_BASELINE_SHIFT_SUPER
+};
+
enum SPVisibility {
SP_CSS_VISIBILITY_HIDDEN,
SP_CSS_VISIBILITY_COLLAPSE,
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :