Skip to content Skip to sidebar Skip to footer

Canvas Clipping Rect - Right/bottom Edge Inclusive?

on Android, there's a Canvas class that represents a drawing surface. It has a clipping rect. Question - are the rect's right and bottom borders inclusive or exclusive? In other wo

Solution 1:

According to another StackOverflow question, right and bottom are exclusive. As I say in my answer there (which I suppose is really a comment), this is consistent with other Java API, and has other benefits.

So, no, you won't be able to draw at ordinate 10. But it does mean that your Rect is a 10×10 pixel square.

Post a Comment for "Canvas Clipping Rect - Right/bottom Edge Inclusive?"