mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2026-03-28 14:46:12 +00:00
Improve clipping of TextBlock
This commit is contained in:
@@ -32,7 +32,7 @@ module CyberarmEngine
|
|||||||
def render
|
def render
|
||||||
# Gosu.clip_to is too expensive to always use so check if we actually need it.
|
# Gosu.clip_to is too expensive to always use so check if we actually need it.
|
||||||
if @text_width > width || @text_height > height
|
if @text_width > width || @text_height > height
|
||||||
Gosu.clip_to(@x, @y, width, height) do
|
Gosu.clip_to(@text.x, @text.y, @width, @height) do
|
||||||
@text.draw
|
@text.draw
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user