[haiku-commits] Re: haiku: hrev47537 - src/tests/servers/app/transformation src/tests/kits/net/service build/jam/repositories/HaikuPorts build/jam src/system/kernel/posix

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 21 Jul 2014 09:59:23 +0200

Hi Adrien,

Am 21.07.2014 09:34, schrieb pulkomandy@xxxxxxxxxxxxx:
############################################################################

Revision:    hrev47537
Commit:      043178a06317ccc9cd36ceda21bf6c6153986b0f
URL:         http://cgit.haiku-os.org/haiku/commit/?id=043178a
Author:      Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Date:        Mon Jul 21 06:17:09 2014 UTC

Add WizzNic

* Update sdl_image_x86 to a version that can load PNG files
* Update giflib_x86 to match what's required by the new SDL_image
package

Some unrelated files slipped into this commit. :-\

But while we are at it:

diff --git a/src/tests/servers/app/transformation/main.cpp 
b/src/tests/servers/app/transformation/main.cpp
index 26e733d..a206338 100644
--- a/src/tests/servers/app/transformation/main.cpp
+++ b/src/tests/servers/app/transformation/main.cpp
@@ -492,6 +492,38 @@ public:
  };


+// #pragma mark - ClippingStates
+
+
+class ClippingStatesTest : public Test {
+public:
+       ClippingStatesTest()
+               :
+               Test("Clipping in nested state")
+       {
+       }
+
+       virtual void Draw(BView* view, BRect updateRect)
+       {
+               BRect r (20, 20, 300, 300);
+               view->SetHighColor(ui_color(B_FAILURE_COLOR));
+               view->FillRect(r);
+
+               BAffineTransform transform;
+               transform.TranslateBy(20, 0);
+               view->SetTransform(transform);
+
+               // This should clip to exactly the area we filled red above.
+               r.OffsetBy(-20, 0);
+               BRegion clipping(r);
+               view->ConstrainClippingRegion(&clipping);
+
+               view->SetHighColor(ui_color(B_SUCCESS_COLOR));
+               view->FillRect(BRect(-1000, -1000, 1000, 1000));
+       }
+};

If the clipping region is unaffected by transformations (except the old origin and scale), and if clipping regions in particular cannot honor many transformations (think for example rotation and shear), why would the expectation be that the above should work?

Best regards,
-Stephan



Other related posts: