[bug #27927] NSColor setFill not well supported and setStroke broken

View: New views
5 Messages — Rating Filter:   Alert me  

[bug #27927] NSColor setFill not well supported and setStroke broken

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


URL:
  <http://savannah.gnu.org/bugs/?27927>

                 Summary: NSColor setFill not well supported and setStroke
broken
                 Project: GNUstep
            Submitted by: qmathe
            Submitted on: Tue 03 Nov 2009 05:23:40 PM GMT
                Category: Gui/AppKit
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Ubuntu 9.04 and Gui + Cairo backend (svn trunk r28906). iirc the same
problems also hold for the art backend.

Here are some -setFill and -setStroke use cases that works well on Cocoa but
not on GNUstep.

The code below works but logs the following error:
DPSundefined: No fill colorspace defined, assume DeviceRGB

[[NSColor redColor] setFill];
[NSBezierPath fillRect: aRect];

And the following code logs the same error but doesn't work, the alpha
component is just ignored:

[[[NSColor redColor] colorWithAlphaComponent: 0.5] setFill];
[NSBezierPath fillRect: aRect];

-setStroke doesn't work at all and logs a similar error than -setFill
(DPSundefined: No stroke colorspace defined, assume DeviceRGB). For example
the code below just draws a red border and not a green one:

[NSBezierPath setDefaultLineWidth: 5.0];
[[NSColor redColor] setFill]; // You can replace -setFill by -set here, the
result is the same
[[NSColor greenColor] setStroke];
[NSBezierPath strokeRect: aRect];

Quentin.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27927>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@...
http://lists.gnu.org/mailman/listinfo/bug-gnustep

[bug #27927] NSColor setFill not well supported and setStroke broken

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27927 (project gnustep):

                  Status:                    None => Ready For Test        
             Assigned to:                    None => FredKiefer            
             Open/Closed:                    Open => In Test                

    _______________________________________________________

Follow-up Comment #1:

Should be fixed in SVN now.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27927>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@...
http://lists.gnu.org/mailman/listinfo/bug-gnustep

[bug #27927] NSColor setFill not well supported and setStroke broken

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #2, bug #27927 (project gnustep):

Hi Fred,

-setStroke: works now and I don't get any error logged as previously with
-setStroke: and -setFill:. This is great.
However there is still a problem with both methods (I tested both art and
cairo backends). They ignore the color alpha component unlike -set.

The code below works as expected:
[[[NSColor redColor] colorWithAlphaComponent: 0.5] set];
[NSBezierPath fillRect: aRect];

But with -setFill: (or -setStroke) as below, the alpha component is ignored,
and the filled rect is just opaque red:
[[[NSColor redColor] colorWithAlphaComponent: 0.5] setFill];
[NSBezierPath fillRect: aRect];

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27927>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@...
http://lists.gnu.org/mailman/listinfo/bug-gnustep

[bug #27927] NSColor setFill not well supported and setStroke broken

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #3, bug #27927 (project gnustep):

OK, try once more with my recent changes.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27927>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@...
http://lists.gnu.org/mailman/listinfo/bug-gnustep

[bug #27927] NSColor setFill not well supported and setStroke broken

by Sylvain Beucler-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27927 (project gnustep):

                  Status:          Ready For Test => Fixed                  
             Open/Closed:                 In Test => Closed                

    _______________________________________________________

Follow-up Comment #4:

I justed tested my code with both art and cairo backends, and everything is
ok now.
Thanks a lot.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27927>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-gnustep mailing list
Bug-gnustep@...
http://lists.gnu.org/mailman/listinfo/bug-gnustep