Spark Line-drawing speed issues


I, after way too many hours of going through my code, finall found out why the linedrawing part of my latest flex 4 project ran really slow.

Spark (and probably all other versions of the linedrawing routine in Flash) runs really slow if the end points end up ‘inbetween’ pixels. Convert the start and end positions to int before drawing and you’ll see a massive speed increase.

Advertisements

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