[Kst] branches/work/kst/1.6/kst/src/libkstapp
Andrew Walker
arwalker at sumusltd.com
Thu Nov 15 23:47:49 CET 2007
SVN commit 737287 by arwalker:
copy label justification setting when label is copied
M +6 -6 kstplotlabel.cpp
M +6 -4 kstplotlabel.h
--- branches/work/kst/1.6/kst/src/libkstapp/kstplotlabel.cpp #737286:737287
@@ -274,14 +274,16 @@
_rotation = l._rotation;
_interpret = l._interpret;
_replace = l._replace;
+ _justify = l._justify;
setText(l._txt); // calls computeTextSize()
return *this;
}
void KstPlotLabel::updateAbsFontSize(int x_pix, int y_pix) {
- double x_s, y_s;
-
+ double x_s;
+ double y_s;
+
x_s = y_s = _fontSize + (double)KstSettings::globalSettings()->plotFontSize;
if (x_pix < y_pix) {
@@ -295,9 +297,7 @@
_absFontSize = int((x_s + y_s)/2);
if (_absFontSize < KstSettings::globalSettings()->plotFontMinSize) {
_absFontSize = KstSettings::globalSettings()->plotFontMinSize;
- }
-
+ }
+
computeTextSize();
}
-
-// vim: ts=2 sw=2 et
--- branches/work/kst/1.6/kst/src/libkstapp/kstplotlabel.h #737286:737287
@@ -71,7 +71,8 @@
void reparse();
float _rotation;
- double _cosr, _sinr; // absolute cos and sin of the rotation angle
+ double _cosr; // absolute cos of the rotation angle
+ double _sinr; // absolute sin of the rotation angle
QString _txt;
QString _fontName;
@@ -79,8 +80,10 @@
bool _interpret : 1;
int _fontSize;
int _absFontSize;
- int _textWidth, _textHeight, _ascent;
-
+ int _textWidth;
+ int _textHeight;
+ int _ascent;
+
KstLJustifyType _justify;
Label::Parsed *_parsed;
int _lineSpacing;
@@ -91,4 +94,3 @@
};
#endif
-// vim: ts=2 sw=2 et
More information about the Kst
mailing list