X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fobjectrenderer.cpp;h=9327c977681dd2ae5186baa8e36404e96860985b;hp=8f4c55f38deed00cba0ade47161aa94e046f14b5;hb=ea748154f1bc7dbc81cb52611a52865e63109439;hpb=dfba002efc3b5f126ddb69e63b9a7dafdd9eacda diff --git a/src/objectrenderer.cpp b/src/objectrenderer.cpp index 8f4c55f..9327c97 100644 --- a/src/objectrenderer.cpp +++ b/src/objectrenderer.cpp @@ -219,8 +219,8 @@ ObjectRenderer::PixelPoint ObjectRenderer::CPUPointLocation(const Vec2 & point, { // hack... Rect result = view.TransformToViewCoords(Rect(point.x, point.y,1,1)); - int64_t x = Int64(result.x*target.w); - int64_t y = Int64(result.y*target.h); + int64_t x = Int64(result.x)*target.w; + int64_t y = Int64(result.y)*target.h; return PixelPoint(x,y); } @@ -239,8 +239,8 @@ void BezierRenderer::RenderBezierOnCPU(unsigned i, Objects & objects, const View ObjectRenderer::RenderLineOnCPU(pix_bounds.x+pix_bounds.w, pix_bounds.y, pix_bounds.x+pix_bounds.w, pix_bounds.y+pix_bounds.h, target, Colour(0,255,0,0)); } - unsigned blen = min(max(2U, (unsigned)Int64(Real(target.w)/view.GetBounds().w)), - min((unsigned)(pix_bounds.w+pix_bounds.h)/4 + 1, 100U)); + unsigned blen = target.w;//min(max(2U, (unsigned)Int64(Real(target.w)/view.GetBounds().w)), + //min((unsigned)(pix_bounds.w+pix_bounds.h)/4 + 1, 100U)); // DeCasteljau Divide the Bezier queue divisions;