The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Rotate background images

These changes was commited to the Birdfont repository Wed, 09 Dec 2015 09:15:39 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Wed, 09 Dec 2015 09:15:39 +0000]

Updated Files

libbirdfont/BackgroundImage.vala
--- a/libbirdfont/BackgroundImage.vala +++ b/libbirdfont/BackgroundImage.vala @@ -472,6 +472,13 @@ // add it cr.save (); + + if (img_rotation != 0) { + cr.translate (Glyph.xc (), Glyph.xc ()); + cr.rotate (img_rotation); + cr.translate (-Glyph.xc (), -Glyph.xc ()); + } + cr.set_source_surface (scaled_image, 0, 0); cr.paint (); cr.restore ();