| View previous topic :: View next topic |
| Author |
Message |
yuki OOo Advocate


Joined: 20 Oct 2005 Posts: 264
|
Posted: Tue Oct 31, 2006 4:38 am Post subject: Danny's Draw Power Tools only B&W |
|
|
I have downloaded Danny's Draw Power Tools but the macros do not produce anything in colour. Any setting I tried produces black & white.
I notice that the macros are old (2003). But that shouldn't be an issue?
The shapes are drawn as expected, but the lines are always black. The colour wheel also comes all black, whilst filled comes in the default fill colour.
I'm using 2.0.4 on WinXP.
Any ideas? |
|
| Back to top |
|
 |
yuki OOo Advocate


Joined: 20 Oct 2005 Posts: 264
|
Posted: Sat Nov 04, 2006 12:08 pm Post subject: |
|
|
| anyone? |
|
| Back to top |
|
 |
mark1ewis Newbie

Joined: 12 Nov 2006 Posts: 1
|
Posted: Sun Nov 12, 2006 3:15 pm Post subject: PowerTools |
|
|
Not sure if it helps, but I've tracked down the problem to the fact that the HSB(double,double,double) function that the power tools are invoking to create a color is always returning 0.
Is the HSB function not supported anymore I wonder? Does anybody know if there's a replacement or an alternate signature.
To the original poster: if you replace the HSB calls with roughly analogous RGB calls then it works. Of course, then you're stuck converting from HSB to RGB format on your own. |
|
| Back to top |
|
 |
gurfle General User


Joined: 16 Feb 2010 Posts: 7 Location: Seattle
|
Posted: Wed Apr 21, 2010 9:23 pm Post subject: |
|
|
In case anyone is still wondering about this . . .
The problem is solved by simply declaring the variables nred, ngreen and nblue in the
function HSB( nHue As Double, nSaturation As Double, nBrightness As Double )
(found in the OOoLib library of "Danny's Draw PowerTools.sxd")
It appears that the more recent editions of OOo Basic will not recognize the type of variables returned from functions, so the arguments nred, ngreen and nblue in the call to __HSBtoRGB always come back as empty variants.
This fix brings color back for me at any rate. I have not checked to see if there are other places where non-declaration of returned function variables could be causing additional bugs.
Nick _________________ Nicholas Dreyer
AMD sempron 3.4GHz, 1G RAM, nForce3-250Gb motherboard
Linux Debian 5.03 (Lenny)
OpenOffice 3.1.1 |
|
| Back to top |
|
 |
|