Bug 205645 - Gradient doesn't fill entire area in Java2D demo
Gradient doesn't fill entire area in Java2D demo
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Francis Kung
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-07 15:59 EDT by Andrew Overholt
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-14 16:49:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
image illustrating the problem (58.75 KB, image/png)
2006-09-07 15:59 EDT, Andrew Overholt
no flags Details
stack trace (86.86 KB, image/png)
2006-09-07 15:59 EDT, Andrew Overholt
no flags Details
narrowing down the problem (871 bytes, text/x-java)
2006-09-11 11:19 EDT, Francis Kung
no flags Details
fix (839 bytes, patch)
2006-09-11 13:53 EDT, Francis Kung
no flags Details | Diff

  None (edit)
Description Andrew Overholt 2006-09-07 15:59:01 EDT
Description of problem:
It looks like the gradient is "running out" of colour in Sun's Java2D demo.

Version-Release number of selected component (if applicable):
libgcj-4.1.1-20

How reproducible:
Always

Steps to Reproduce:
1. Get Java2Demo.jar
2. java -jar Java2Demo.jar
3. Go to the Arcs_Curves tab and observe the BezierAnim
  
Actual results:
When it is on gradient, you'll notice that it sometimes does not fill all the
way to the right of the moving bezier.  See the attached screenshot.

Additional info:
I will attach another screenshot of some stacktraces that appear while running
the demo.
Comment 1 Andrew Overholt 2006-09-07 15:59:01 EDT
Created attachment 135806 [details]
image illustrating the problem
Comment 2 Andrew Overholt 2006-09-07 15:59:46 EDT
Created attachment 135807 [details]
stack trace
Comment 3 Francis Kung 2006-09-11 11:16:39 EDT
This problem only appears on Cairo 1.2, and seems to be related to cairo's
treatment of gradient control vectors.
Comment 4 Francis Kung 2006-09-11 11:19:12 EDT
Created attachment 136008 [details]
narrowing down the problem

classpath + cairo 1.0 acts the same way as the reference implementation (points
beyond the defined gradient vector are filled as opaque), but classpath + cairo
1.2 does not extend the fill beyond the gradient vector.
Comment 5 Francis Kung 2006-09-11 13:53:42 EDT
Created attachment 136025 [details]
fix

This patch to GNU Classpath fixes the problem, but requires cairo 1.2; it will
break the build if compiled against cairo 1.0.
Comment 6 Thomas Fitzsimmons 2006-09-14 15:04:40 EDT
(In reply to comment #5)
> Created an attachment (id=136025) [edit]
> fix
> 
> This patch to GNU Classpath fixes the problem, but requires cairo 1.2; it will
> break the build if compiled against cairo 1.0.

Does Cairo provide compatibility defines?

I'm thinking:

#if CAIRO_VERSION >= CAIRO_1_2
extend = (cyclic == JNI_TRUE) ? CAIRO_EXTEND_REFLECT : CAIRO_EXTEND_PAD;
#else
extend = (cyclic == JNI_TRUE) ? CAIRO_EXTEND_REFLECT : CAIRO_EXTEND_NONE;
#endif
Comment 7 Francis Kung 2006-09-14 16:49:07 EDT
Thanks, that was what I was looking for.

This has now been fixed upstream in GNU Classpath.

Note You need to log in before you can comment on or make changes to this bug.