主题:  如何动态地在DIR中画圆,用LINGO?或是用过滤效果?

喝茶的

职务:普通成员
等级:1
金币:0.0
发贴:6
注册:2002/6/14 9:52:48
#12002/6/14 9:55:17
如何动态地在DIR中画圆,用LINGO?或是用过滤效果?



酷狗

职务:版主
等级:2
金币:10.0
发贴:610
注册:2000/9/16 9:26:36
#22002/6/14 15:42:06
draw()

Syntax

imageObject.draw(x1, y1, x2, y2, colorObjectOrParameterList)
imageObject.draw(point(x, y), point(x, y), colorObjectOrParameterList)
imageObject.draw(rect, colorObjectOrParameterList)
Description

This function draws a line or an unfilled shape of color colorObject in a rectangular region of the given image object, as specified in any of the three ways shown. The draw returns a value of 1 if there is no error. You can use the optional property list ParameterList function to specify the following shape properties: Property
Description

#shapeType
A symbol value of #oval, #rect, #roundRect, or #line. The default is #line.

#lineSize
The width of the line to use in drawing the shape.

#color
A color object, which determines the color of the shape border.




If you do not provide a parameter list, this function draws a 1-pixel line between the first and second points given or between the upper left and lower right corners of the given rectangle.

For best performance, with 8-bit or lower images the colorObject should contain an indexed color value. For 16- or 32-bit images, use an RGB color value.

If you want to fill a solid region, use the fill() function.

Example

This statement draws a 1-pixel, dark red, diagonal line from point (0, 0) to point (128, 86) within the image of member Happy.

member("Happy").image.draw(0, 0, 128, 86, rgb(150,0,0))
Example

This statement draws a dark red, 3-pixel unfilled oval within the image of member Happy. The oval is drawn within the rectangle (0, 0, 128, 86).

member("Happy").image.draw(0, 0, 128, 86, [#shapeType:#oval, #lineSize:3, \
#color: rgb(150, 0, 0)])



D计划-混沌

职务:管理员
等级:6
金币:15.2
发贴:3528
注册:2007/4/9 9:48:37
#32002/6/14 18:38:28