qtpaint (version 1.1.0)

add-scene-items: Adding scene items

Description

These functions constitute a vectorized API for adding graphical primitive items into a scene. Each primitive is represented by a separate canvas item. This is a different paradigm from the layer-based painting, which has a more appropriate design for most interactive graphics. Most of the time, the user should ignore this API.

Usage

qscene.points(s, x, y, radius=1)
qscene.lines(s, x, y, lwd=0)
qscene.segments(s, x1, y1, x2, y2, lwd=0)
qscene.rect(s, x, y, w=1, h=1)

Arguments

s
The scene, a C++ QGraphicsScene
x
The X coordinates, as expected by xy.coords, recycled
y
The Y coordinates, as expected by xy.coords, recycled
radius
The scalar radius for the points, in device coordinates
lwd
The vector of line widths, in device coordinates, recycled
x1
The first X coordinates, recycled
y1
The first Y coordinates, recycled
x2
The second X coordinates, recycled
y2
The second Y coordinates, recycled
w
Vector of rectangle widths, recycled
h
Vector of rectangle heights, recycled