简体   繁体   中英

Layering in RVG

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.

形状和文字

如@Brennan所指定,将按照添加形状的顺序绘制形状。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM