We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
We can rotate a view by the rotate() method on the view:
rotate()
library(qtpaint) s = qscene() n = 1000; x=rnorm(n, 50, 15); y = runif(n, 20, 80); r = runif(n, 0, 10); col = sample(colors(), n, TRUE) test_layer = qlayer(s, function(layer, painter) { qdrawRect(painter, 5, 10, 95, 90, stroke = 'black') qdrawCircle(painter, x, y, r, stroke = col) qdrawText(painter, 'TEXT TEST', 50, 5) }, limits=qrect(0,0,100,100)) v = qplotView(s) print(v) ## rotate v$rotate(90) v$updateSceneGeometry() ## 45 degrees v$rotate(45) v$updateSceneGeometry()
Original:
Rotate by 90 degrees:
45 degrees:
Looks like the direction is clockwise.