summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4dd4646)
raw | patch | inline | side by side (parent: 4dd4646)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 4 Nov 2006 21:59:07 +0000 (21:59 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 4 Nov 2006 21:59:07 +0000 (21:59 +0000) |
src/display/nr-arena-shape.cpp | patch | blob | history | |
src/display/nr-arena-shape.h | patch | blob | history |
index 357245667682cdce73caf6cb143c271b280ac7c8..8c4b42577b00fceaca3f423b4eb75e10e08ca20c 100644 (file)
((shape->_stroke.paint.type() != NRArenaShape::Paint::NONE) &&
( fabs(shape->_stroke.width * scale) > 0.01 ))) { // sinon c'est 0=oon veut pas de bord
- float width = MAX(0.125, shape->_stroke.width * scale);
- if (outline)
+ float style_width = MAX(0.125, shape->_stroke.width * scale);
+ float width;
+ if (outline) {
width = 0.5; // 1 pixel wide, independent of zoom
+ } else {
+ width = style_width;
+ }
NR::Matrix cached_to_new = NR::identity();
}
if (0 != isometry && !is_inner_area(shape->cached_sarea, *area))
isometry = 0;
+ if (0 != isometry && width != shape->cached_width) {
+ // if this happens without setting style, we have just switched to outline or back
+ isometry = 0;
+ }
}
if ( isometry == 0 ) {
shape->cached_stroke->ConvertToShape(theShape, fill_nonZero);
}
+ shape->cached_width = width;
+
shape->cached_sctm=gc->transform;
shape->cached_sarea = *area;
delete thePath;
index cd72013f6d2cab12e063309addcb84f01bc8e148..782ae127a0acd019ae562205ea68ef9e72b41ba9 100644 (file)
// the 2 cached polygons, for rasterizations uses
Shape *fill_shp;
Shape *stroke_shp;
+ // the stroke width of stroke_shp, to detect when it changes (on normal/outline switching) and rebuild
+ float cached_width;
// delayed_shp=true means the *_shp polygons are not computed yet
// they'll be computed on demand in *_render(), *_pick() or *_clip()
// the goal is to not uncross polygons that are outside the viewing region