[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Wed Jan 7 22:22:05 CET 2004
CVS commit by arwalker:
Added two additional point types, because you can never have enough.
M +14 -4 kstpoint.cpp 1.4
M +1 -1 kstpoint.h 1.4
--- kdeextragear-2/kst/kst/kstpoint.cpp #1.3:1.4
@@ -49,6 +49,7 @@ void KstPoint::draw(QPainter *p, int x,
}
- if (s < 1)
+ if (s < 1) {
s = 1;
+ }
switch (Type) {
@@ -79,4 +80,12 @@ void KstPoint::draw(QPainter *p, int x,
p->drawLine(x, y-s, x+s, y+s);
break;
+ case 6:
+ p->setBrush(QBrush::SolidPattern);
+ p->drawRect(x-s, y-s, 2*s+1, 2*s+1);
+ break;
+ case 7:
+ p->drawLine(x-s, y, x+s, y);
+ p->drawLine(x, y-s, x, y+s);
+ break;
}
p->setBrush(QBrush::NoBrush);
@@ -88,6 +97,7 @@ int KstPoint::getDim(QPainter *p) {
s = (p->window().width()+p->window().height())/400;
- if (s < 1)
+ if (s < 1) {
s = 1;
+ }
return s;
--- kdeextragear-2/kst/kst/kstpoint.h #1.3:1.4
@@ -25,5 +25,5 @@
*/
-#define KSTPOINT_MAXTYPE 5
+#define KSTPOINT_MAXTYPE 7
class KstPoint {
More information about the Kst
mailing list