Hi,
In the Line (graphiics) command, what is B (or BF) - a number or a string ?
I need to draw a filled box if a condition is true, and an empty box if false.
Example:
'----------------------
dim as string btype;
if(condition =0) then
btype = "B"
else
btype= "BF"
endif
Line (15,15)- step(100, 100), RGB(70,70,70), btype
'------------------------
The above gives an error .
Is there no way but to write the entire line command twice- once with B and once with BF ?
Thanks !
Line (Graphics) B/BF question [RESOLVED]
Line (Graphics) B/BF question [RESOLVED]
Last edited by bethell on Dec 21, 2009 4:53, edited 1 time in total.
There is no way that I know of. And even if it were possible, writing it twice:Is there no way but to write the entire line command twice- once with B and once with BF ?
Code: Select all
if (condition = 0) then
Line (15,15)- step(100, 100), RGB(70,70,70), B
else
Line (15,15)- step(100, 100), RGB(70,70,70), BF
end if
Thanks, Michael,
Actually, there are 22 'line' statements in my function :P
I want to save a portion of my screen as a bmp in black & white (not even grayscale), for purpose of printing.
(They are some graphs plotted on screen in 32bit color)
The plan is:
When 'Print' is selected(in my program), I breifly redraw the relevant portion of the screen replacing all graphic commands with black line drawings on a white background, then save that portion as a bmp. Then I redraw the original graphics.
So I was looking for a 'single switch' way to convert all my filled boxes to bordered boxes for this purpose.
Oh well....
Actually, there are 22 'line' statements in my function :P
I want to save a portion of my screen as a bmp in black & white (not even grayscale), for purpose of printing.
(They are some graphs plotted on screen in 32bit color)
The plan is:
When 'Print' is selected(in my program), I breifly redraw the relevant portion of the screen replacing all graphic commands with black line drawings on a white background, then save that portion as a bmp. Then I redraw the original graphics.
So I was looking for a 'single switch' way to convert all my filled boxes to bordered boxes for this purpose.
Oh well....
Code: Select all
Sub Box(condition As Integer,_
x1 As Integer,_
y1 As Integer,_
x2 As Integer,_
y2 As Integer)
If (condition = 0) Then
Line (x1,y1)- Step(x2, y2), Rgb(70,70,70), B
Else
Line (x1,y1)- Step(x2, y2), Rgb(70,70,70), BF
End If
End Sub
Box(condition, 15, 15, 100, 100)