... | ... | @@ -5,8 +5,14 @@ from sverchok.utils.modules.shader_utils import ShaderLib2D |
|
|
|
|
|
|
|
|
canvas = ShaderLib2D()
|
|
|
canvas.add_rect(x, y, w, h, (1.0, 1.0, 1.0))
|
|
|
...
|
|
|
|
|
|
# add a rectangle of W * H at X, Y, with a solid rgb (3-tuple) of
|
|
|
canvas.add_rect(x, y, w, h, rgb_color)
|
|
|
|
|
|
# for more specific drawing need you can generate your own verts, colors and face indices
|
|
|
# and add them to the total geom this way
|
|
|
canvas.add_data(verts, colors, indices)
|
|
|
|
|
|
geom = canvas.compile()
|
|
|
verts = geom.verts
|
|
|
tris = geom.tris
|
... | ... | |