
qrect(x0, y0, x1, y1)
qpoint(x, y)
qsize(width, height)
qpolygon(x = NULL, y = NULL)
qfont(family = baseFont$family(), pointsize =
baseFont$pointSize(), weight = baseFont$weight(),
italic = baseFont$style() == Qt$QFont$StyleItalic,
baseFont = Qt$QApplication$font())
qpen(brush = qbrush(), width = 0L, style = Qt$Qt$SolidLine,
cap = Qt$Qt$SquareCap, join = Qt$Qt$BevelJoin)
qbrush(color = qcolor(), style = Qt$Qt$SolidPattern)
qcolor(red = 0, green = 0, blue = 0, alpha = 255)
qtransform(m11 = 1.0, m12 = 0.0, m13 = 0.0, m21 = 0.0, m22 = 1.0,
m23 = 0.0, m31 = 0.0, m32 = 0.0, m33 = 1.0)
x0
and x1
. If a 2x2 matrix
, the columns
represent the X and Y positions. If missing, a "null" rectangle is
returned.y0
and y1
.x
and y
. For qpolygon
, passed to xy.coords
.qpolygon
, passed
to xy.coords
.width
and height
. If missing, a "null" size is
returned. For qpen
, width of the line.QBrush
object
via qbrush(brush)
.qpen
, pattern type for qbrush
.QColor
via qcolor(color)
.col2rgb
.RQtObject
F
variant, like QSizeF
, the
variant is chosen based on the type of the input. If the values are
double, a QSizeF
instance is returned, otherwise an instance of
QSize
.## notice the coercion chaining:
redColor <- qcolor("red")
redBrush <- qbrush("red")
redPen <- qpen("red")
blackPen <- qpen()
## Qt's constructor uses width/height, not x1/y1
rect <- qrect(as.matrix(Qt$QRectF(1, 1, 5, 5)))
as.matrix(rect)
## Creates 'QRect' not 'QRectF'; integer input
qrect(range(1:10), range(2:5))
qsize(as.vector(qpoint(5, 5)))
mono_it <- qfont("monospace", italic = TRUE)
Run the code above in your browser using DataLab