Fix color handling with text outline stroking

Needed to set squibcolor prior to translating the coordinate system so that gradients are relative to the card (as is documented). This also means stroking is done AFTER drawing the text, which looks better anyway.
This commit is contained in:
Andy Meneely
2015-04-30 09:54:41 -04:00
parent 2e84cf4e6a
commit 71defb9e33
20 changed files with 206 additions and 206 deletions
+2 -2
View File
@@ -163,6 +163,7 @@ module Squib
extents = nil
str = str.to_s
use_cairo do |cc|
cc.set_source_squibcolor(color)
cc.translate(x,y)
cc.rotate(angle)
cc.move_to(0, 0)
@@ -193,9 +194,8 @@ module Squib
cc.move_to(0, vertical_start)
cc.update_pango_layout(layout)
stroke_outline!(cc, layout, stroke_width, stroke_color)
cc.set_source_squibcolor(color)
cc.show_pango_layout(layout)
stroke_outline!(cc, layout, stroke_width, stroke_color)
begin
embed_draws.each { |ed| ed[:draw].call(self, ed[:x], ed[:y] + vertical_start) }
rescue Exception => e