Layering in RVG

58 views Asked by At

How can I layer shapes/text in Ruby RVG library? For example, I want to have "Text 1" over "Text 2":

rvg.text(0, 0, "Text 1")
rvg.text(0, 0, "Text 2")

Right now it will have "Text 2" over "Text 1" but I want to have "Text 1" over "Text 2".

Edit

In the following image I add a shape and then the text but the text is still under the shape. Regardless of which order I use, the text is always underneath.

shape and text

1

There are 1 answers

0
Artem Kalinchuk On

As @Brennan specified, shapes will be drawn in the order they are added.