PHP код:
#---------------------------------#
# Название: Font Editor #
# Автор: Andrew #
#---------------------------------#
#Растояние от текста до тени
$shadow_power = 3
#Жирный текст
$font_bold = true
#Размер текста
$font_size = 30
class Bitmap
#копирование метода
if($launch == nil)
$launch = true
alias andrew_draw_text draw_text
end
#переопределене метода
def draw_text(x2, y2, w2 = 0, h2 = 0, text2 = '', a2 = 0, sh = true)
font.bold = $font_bold
font.size = $font_size
if x2.is_a?(Rect)
x, y, w, h, text, a = x2.x, x2.y, x2.width, x2.height, y2, w2
else
x, y, w, h, text, a = x2, y2, w2, h2, text2, a2
end
if sh
temp = font.color.clone
font.color = Color.new(0,0,0)
draw_text(x+$shadow_power,y+$shadow_power,w,h,text,a,false)
font.color = temp
draw_text(x,y,w,h,text,a,false)
else
andrew_draw_text(x,y,w,h,text,a)
end
end
end
Социальные закладки