From 4572d52900fc3c52fbcf0618882b1a129c87a334 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 19 Jan 2009 22:39:54 +0000 Subject: [PATCH] Fixed Painting gradient stroke git-svn-id: svn://ultimatepp.org/upp/trunk@788 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Painter/Painting.cpp | 12 ++++++------ uppsrc/Painter/agg_rasterizer_sl_clip.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/uppsrc/Painter/Painting.cpp b/uppsrc/Painter/Painting.cpp index 2ddeb98f3..22a9015b4 100644 --- a/uppsrc/Painter/Painting.cpp +++ b/uppsrc/Painter/Painting.cpp @@ -107,24 +107,24 @@ void PaintingPainter::StrokeOp(double width, const Image& image, const Matrix2D& void PaintingPainter::StrokeOp(double width, double x1, double y1, const RGBA& color1, double x2, double y2, const RGBA& color2, int style) { Put(PAINTING_STROKE_GRADIENT); - Put(color1); - Put(color2); - Put(style); Putf(width); Putf(x1, y1); + Put(color1); Putf(x2, y2); + Put(color2); + Put(style); } void PaintingPainter::StrokeOp(double width, double fx, double fy, const RGBA& color1, double x, double y, double r, const RGBA& color2, int style) { Put(PAINTING_STROKE_RADIAL); - Put(color1); - Put(color2); - Put(style); Putf(width); Putf(fx, fy); + Put(color1); Putf(x, y); Putf(r); + Put(color2); + Put(style); } void PaintingPainter::ClipOp() diff --git a/uppsrc/Painter/agg_rasterizer_sl_clip.h b/uppsrc/Painter/agg_rasterizer_sl_clip.h index 44f3d786f..d07452502 100644 --- a/uppsrc/Painter/agg_rasterizer_sl_clip.h +++ b/uppsrc/Painter/agg_rasterizer_sl_clip.h @@ -35,7 +35,7 @@ namespace agg } static int xi(int v) { return v; } static int yi(int v) { return v; } - static int upscale(double v) { STIMING("upscale"); return iround(v * poly_subpixel_scale); } + static int upscale(double v) { return iround(v * poly_subpixel_scale); } static int downscale(int v) { return v; } };