Android api quirk number 5

Wow this is silly.

public void drawRect(float left, float top, float right, float bottom, Paint paint)

Usually it doesn’t matter if top is higher than bottom. Either way a rectangle is drawn.

UNLESS, top is outside of the screen. Then no rectangle is drawn at all.

So you can have rectangles that are partially visible, but only if their top is greater than their bottom.

ZOMG that was a hard bug to figure out….

2 thoughts on “Android api quirk number 5

  1. Comment on Wall Of Shame on Reddit:

    Because this is automatically generated, it is sometimes incorrect. Case in point: Jinja. “Jinja” refers to an older version that doesn’t have Python 3 support. “Jinja2” has full Python 3 support. For python-dateutil, the version on PyPi has no Python 3 support, but the current version has completely dropped Python 2 support.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s