Bug 860 - AWT Printing (AWTTilePainter): Shall use the enclosing integer rectangle of the scaled double precision clipping rect
Summary: AWT Printing (AWTTilePainter): Shall use the enclosing integer rectangle of t...
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: awt (show other bugs)
Version: 2
Hardware: All all
: --- normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-10-12 19:57 CEST by Sven Gothel
Modified: 2013-10-12 20:08 CEST (History)
0 users

See Also:
Type: ---
SCM Refs:
38bc1dbe6d2402218bc348516545b25e4db177b9
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2013-10-12 19:57:14 CEST
AWTTilePainter simply rounds the scaled double precision clipping rectangle 
to receive the integer rectangle.

This leads to uncovered drawing areas, since the integer rectangle position 
could be greater - and the size could be smaller than the double precision source.

To get the enclosing rectangle, we need to use 
  iPos = floor(position)
  iSize = ceil(position+size) - floor(position) 

.. turns our that the double precision 'Rectangle Rectangle2D.getBounds()'
already performs this math.