| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
|
|
|
|
| |
considered in AWTTilePainter: 'Origin of GL image is still on Bottom'
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
allowing user to set custom tile size for performance evaluation/tweak
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rectangle of the scaled double precision clipping rect
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.
|
|
|
|
| |
identity tranform in such case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
functionality (reshapeTile(..), ..); Only process GLEventListener impl. TileRendererListener; attachToAutoDrawable -> attachAutoDrawable, etc.
-TileRendererNotify -> TileRendererListener
- Added methods:
- void reshapeTile(TileRendererBase tr,int tileX, int tileY, int tileWidth, int tileHeight, int imageWidth, int imageHeight);
- void startTileRendering(TileRendererBase tr);
- void endTileRendering(TileRendererBase tr);
allowing to clarify user code and API specification,
i.e. TR only processes GLEventListener which impl. TileRendererListener.
This also allows simplifying the API doc, while having a more descriptive
reshape method focusing solely on tile rendering.
Further more, the start/end TR methods allow certain GL related actions
while the context is current before and after iterating through the tiles.
This is even used for RandomTileRenderer (one tile only), to allow
to reuse same TileRendererListener for diff TRs.
- Fix language, attach and detach usage was vice versa. We do attach an GLAutoDrawable to a TR
- attachToAutoDrawable -> attachAutoDrawable
- detachFromAutoDrawable -> detachAutoDrawable
- Adapted unit tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
upper area, cleanup.
TestTiledPrintingGearsSwingAWT2: Provoked !flipped bug where top-row was positioned too low
due to using full size tile-height.
Cutting of the unused top-row's upper area corrects this issue.
vertical-flip mode does not expose this situation, since flipping
shifts the payload to the upper tile area.
TestTiledPrintingGearsSwingAWT2: Also tests an alternative transparent overlapping mode
without layout.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
double precicion clip bounds 'all the way'; Explicitly scale image and clip w/ current scaled transform.
- Use 'Shape getClip()'
Don't assume Rectangle2D, but use Shape's getBounds2D()
- Use double precicion clip bounds 'all the way'
Remove rounding error on clip bounds w/ start value, which was _not_ using doubles.
- Explicitly scale image and clip w/ current scaled transform.
Instead of abusing Graphics2D's clip shape to scale image size and clip-area,
explicitly use transform both bounding boxes into transformed space,
scale space and transform out (inversion).
A possible NoninvertibleTransformException will be thrown while Graphics2D has not been modified.
|
|
|
|
|
|
| |
location and destination must follow same math as w/ vertical-flip.
.. clipping and tile-height was not considered.
|
| |
|
|
|
|
| |
NIO BufferedImage, adding OffscreenPrintable tests to all unit tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AWTPrintLifecycle's lifecycle
- AWTPrintLifecycle:
- Should decorate:
PrinterJob.print(..),
instead of within Printable.print(..) { .. container.printAll(..); .. }
This is due to AWT print implementation, i.e.
AWT will issue Printable.print(..) multiple times for 'overlapping'
or non-opaque elements!
- Move from javax.media.opengl.awt -> com.jogamp.nativewindow.awt
- Make _interface_ AWT agnostic, i.e. remove Graphics2D from 'setup(..)'
- Add 'int numSamples' to 'setup(..)' to determine the number of samples
- AWTTilePrinter:
- Use double precision when scaling image-size and clip-rect,
then round them to integer values.
Otherwise AWT will use the bounding box for the clipping-rectangular.
- Clip negative portion of clip-rect,
this removes redundant overpaints, as well as increasing the tile count
due to the increased clipping-size.
- Clip the image-size in the tile-renderer according to the clip-rect.
- DEBUG_TILES: Dump tiles to file
- Use sub-image of final BuffereImage instead
of adding another clipping region. This might increase performance
if no clip-rect has been set.
TODO:
TestTiledPrintingGearsSwingAWT overlapping tests exposes
a 'off by one' bug of the first layer's background!
Note: The GL content seems to be correct though - maybe it's simply an AWT rounding error ..
|
|
|
|
| |
drawable, skip vertical flip and use 1:1 y-coord.
|
| |
|
|
|
|
| |
GLCanvas/GLJPanel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and convenient AWT container traversal context; GLCanvas/GLJPanel properly handle existing MSAA and req. AA;
- Test: Don't resize frame, tweek print-matrix
- Use scaleComp72 to scale the frame to fit on page,
i.e. global print matrix
- Use scaleGLMatXY = 72.0 / glDPI
to locally scale on the GL drawable as being passed to AWTPrintLifecycle.setup(..)
- Hence frame stays untouched/stable, no need for 'offscreen' print test,
which is removed.
- AWTPrintLifecycle: Add scale and convenient AWT container traversal context
Use a simple decoration for all AWTPrintLifecycle impl. components within a container:
final AWTPrintLifecycle.Context ctx = AWTPrintLifecycle.Context.setupPrint(frame, g2d, scaleGLMatXY, scaleGLMatXY);
try {
} finally {
ctx.releasePrint();
}
- GLCanvas/GLJPanel properly handle existing MSAA and req. AA;
- GLCanvas: Workaround bug where onscreen MSAA cannot switch to offscreen FBO,
i.e. stay 'onscreen'
- GLJPanel: Use new offscreen FBO if MSAA is requested and not yet used.
- GLJPanel.Offscreen.postGL(): always swapBufer(), was missing for !GLSL swapping
Results GLCanvas / GLJPanel:
- Good scaling
- Stable behavior / visibility
- High DPI mode works
|
|
reused w/ GLCanvas and GLJPanel
|