Bug 205645 - Gradient doesn't fill entire area in Java2D demo
Summary: Gradient doesn't fill entire area in Java2D demo
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc   
(Show other bugs)
Version: rawhide
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Francis Kung
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-07 19:59 UTC by Andrew Overholt
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-14 20:49:07 UTC
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 19:59 UTC, Andrew Overholt
no flags Details
stack trace (86.86 KB, image/png)
2006-09-07 19:59 UTC, Andrew Overholt
no flags Details
narrowing down the problem (871 bytes, text/x-java)
2006-09-11 15:19 UTC, Francis Kung
no flags Details
fix (839 bytes, patch)
2006-09-11 17:53 UTC, Francis Kung
no flags Details | Diff

Description Andrew Overholt 2006-09-07 19:59:01 UTC
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 19:59:01 UTC
Created attachment 135806 [details]
image illustrating the problem

Comment 2 Andrew Overholt 2006-09-07 19:59:46 UTC
Created attachment 135807 [details]
stack trace

Comment 3 Francis Kung 2006-09-11 15:16:39 UTC
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 15:19:12 UTC
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 17:53:42 UTC
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 19:04:40 UTC
(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 20:49:07 UTC
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.