From 64dd737cf387c94e968bf95c2fb2bcaa668fc780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 2 Dec 2006 11:12:12 +0000 Subject: [PATCH] * fixed the dirty canvas when Icon-O-Matic is started in Haiku (and also improved performance of rendering icons, the background was cleared for no reason on each Draw() call) However there must be a bug still in the app_server which causes GetClippingRegion() to return an out-of-date clipping region (R5 has the very same bug though) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19413 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/icon-o-matic/CanvasView.cpp | 5 ----- src/apps/icon-o-matic/shape/PathManipulator.cpp | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/apps/icon-o-matic/CanvasView.cpp b/src/apps/icon-o-matic/CanvasView.cpp index 22ecd8c7c9..cfa54b6d52 100644 --- a/src/apps/icon-o-matic/CanvasView.cpp +++ b/src/apps/icon-o-matic/CanvasView.cpp @@ -38,10 +38,6 @@ CanvasView::CanvasView(BRect frame) fOffsreenBitmap(NULL), fOffsreenView(NULL) { - #if __HAIKU__ - SetFlags(Flags() | B_SUBPIXEL_PRECISE); - #endif // __HAIKU__ - _MakeBackground(); fRenderer->SetBackground(fBackground); } @@ -114,7 +110,6 @@ CanvasView::Draw(BRect updateRect) BRegion clipping; GetClippingRegion(&clipping); fOffsreenView->ConstrainClippingRegion(&clipping); - fOffsreenView->FillRect(updateRect, B_SOLID_LOW); _DrawInto(fOffsreenView, updateRect); diff --git a/src/apps/icon-o-matic/shape/PathManipulator.cpp b/src/apps/icon-o-matic/shape/PathManipulator.cpp index ca2ccc11ad..3725a10c59 100644 --- a/src/apps/icon-o-matic/shape/PathManipulator.cpp +++ b/src/apps/icon-o-matic/shape/PathManipulator.cpp @@ -305,12 +305,22 @@ class StrokePathIterator : public VectorPath::Iterator { void PathManipulator::Draw(BView* into, BRect updateRect) { - // draw the Bezier curve, but only if editing - // if not "editing", the path is actually on top all other modifiers + // draw the Bezier curve, but only if not "editing", + // the path is actually on top all other modifiers // TODO: make this customizable in the GUI + + #if __HAIKU__ + uint32 flags = into->Flags(); + into->SetFlags(flags | B_SUBPIXEL_PRECISE); + #endif // __HAIKU__ + StrokePathIterator iterator(fCanvasView, into); fPath->Iterate(&iterator, fCanvasView->ZoomLevel()); + #if __HAIKU__ + into->SetFlags(flags); + #endif // __HAIKU__ + into->SetLowColor(0, 0, 0, 255); BPoint point; BPoint pointIn;