Built tkpath fetched via cvs 7/16
FreeBSD 4.8 unix
Cairo 1.0.2
X11 bit depth 16
Running the following, I get a green circle, not red
The apple demo and tiger demo also get incorrect colors
based on your examples
$ wish
% package require tkpath
0.2
% canvas .c
.c
% pack .c
% .c create circle 50 50 -r 20 -fill red
1
mrdave(at)spymac.com
Logged In: YES
user_id=108900
Originator: NO
Since cairo drawing shall be device independent and it works on 24 depth screens
I suspect that the issue is with cairo itself. SInce cairo is now 1.2.6
I guess the problem has neen fixed.
/Mats
I had this same problem and tracked down a fix. It's specific to the Cairo backend, in unix/tkUnixCairoPath.c:
64,66c71,73
< RedDoubleFromXColorPtr(GetColorFromPathColor(style->fill)),
< GreenDoubleFromXColorPtr(GetColorFromPathColor(style->fill)),
< BlueDoubleFromXColorPtr(GetColorFromPathColor(style->fill)),
---
> (double)(GetColorFromPathColor(style->fill)->red) / 0xffff,
> (double)(GetColorFromPathColor(style->fill)->green) / 0xffff,
> (double)(GetColorFromPathColor(style->fill)->blue) / 0xffff,
522,524c537,539
< RedDoubleFromXColorPtr(style->strokeColor),
< GreenDoubleFromXColorPtr(style->strokeColor),
< BlueDoubleFromXColorPtr(style->strokeColor),
---
> (double)((style->strokeColor)->red) / 0xffff,
> (double)((style->strokeColor)->green) / 0xffff,
> (double)((style->strokeColor)->blue) / 0xffff,
I posted this on comp.lang.tcl, but hadn't seen this bug report.
_Tim.J.Edwards
I had this same problem and tracked down a fix. It's specific to the Cairo backend, in unix/tkUnixCairoPath.c:
64,66c71,73
< RedDoubleFromXColorPtr(GetColorFromPathColor(style->fill)),
< GreenDoubleFromXColorPtr(GetColorFromPathColor(style->fill)),
< BlueDoubleFromXColorPtr(GetColorFromPathColor(style->fill)),
---
> (double)(GetColorFromPathColor(style->fill)->red) / 0xffff,
> (double)(GetColorFromPathColor(style->fill)->green) / 0xffff,
> (double)(GetColorFromPathColor(style->fill)->blue) / 0xffff,
522,524c537,539
< RedDoubleFromXColorPtr(style->strokeColor),
< GreenDoubleFromXColorPtr(style->strokeColor),
< BlueDoubleFromXColorPtr(style->strokeColor),
---
> (double)((style->strokeColor)->red) / 0xffff,
> (double)((style->strokeColor)->green) / 0xffff,
> (double)((style->strokeColor)->blue) / 0xffff,
I posted this on comp.lang.tcl, but hadn't seen this bug report.
_Tim.J.Edwards
I had this same problem and tracked down a fix. It's specific to the Cairo backend, in unix/tkUnixCairoPath.c:
64,66c71,73
< RedDoubleFromXColorPtr(GetColorFromPathColor(style->fill)),
< GreenDoubleFromXColorPtr(GetColorFromPathColor(style->fill)),
< BlueDoubleFromXColorPtr(GetColorFromPathColor(style->fill)),
---
> (double)(GetColorFromPathColor(style->fill)->red) / 0xffff,
> (double)(GetColorFromPathColor(style->fill)->green) / 0xffff,
> (double)(GetColorFromPathColor(style->fill)->blue) / 0xffff,
522,524c537,539
< RedDoubleFromXColorPtr(style->strokeColor),
< GreenDoubleFromXColorPtr(style->strokeColor),
< BlueDoubleFromXColorPtr(style->strokeColor),
---
> (double)((style->strokeColor)->red) / 0xffff,
> (double)((style->strokeColor)->green) / 0xffff,
> (double)((style->strokeColor)->blue) / 0xffff,
I posted this on comp.lang.tcl, but hadn't seen this bug report.
_Tim.J.Edwards