View Full Version : Viewport Drawing Problem

06 June 2008, 01:28 PM
I'm using 'gw' functions to draw some lines in the viewport
and I can't find the way to control their color from the default color, blue.

example code:

gw.setTransform (Matrix3 1)
gw.Polyline #([0,0,0],[50,0,0],[50,50,0],[0,50,0]) true rgb:#(green,green,green,green)
gw.setColor #line green
gw.enlargeUpdateRect #whole

can anyone help?

06 June 2008, 03:43 PM
'fraid it draws perfectly green here - regardless of whether set through RGB: or with setColor. I made sure that it's not just 'always green' for me by specifying red,green,blue,yellow as the RGB array and got a colorful little gradiented square.

restart max?
try a different display driver?

Can't say I'm seeing anything in the Customize menu regarding some override toggle that might be at play here..

06 June 2008, 04:02 PM
Thanks ZeBoxx2.

06 June 2008, 01:42 PM
hi TzMtn,

I get the same problems as you! however setting the color before drawing it seems to solve the issue -

gw.setTransform (Matrix3 1)
gw.setColor #line yellow
gw.Polyline #([0,0,0],[150,0,0],[150,150,0],[0,150,0]) true
gw.enlargeUpdateRect #whole

06 June 2008, 01:49 PM
LoneRobot - thanks:thumbsup:, that solved my problem.

CGTalk Moderation
06 June 2008, 01:49 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.