Advertisement
M3rein

Untitled

Apr 27th, 2017
1,028
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. def renderMultiLine(bitmap,xDst,yDst,normtext,maxheight,baseColor,shadowColor)
  2. for i in 0...normtext.length
  3. width=normtext[i][3]
  4. textx=normtext[i][1]+xDst
  5. texty=normtext[i][2]+yDst
  6. if shadowColor
  7. height=normtext[i][4]
  8. text=normtext[i][0]
  9. bitmap.font.color=shadowColor
  10. bitmap.draw_text(textx-2,texty-2,width,height,text,0)
  11. bitmap.draw_text(textx,texty-2,width,height,text,0)
  12. bitmap.draw_text(textx+2,texty-2,width,height,text,0)
  13. bitmap.draw_text(textx-2,texty,width,height,text,0)
  14. bitmap.draw_text(textx+2,texty,width,height,text,0)
  15. bitmap.draw_text(textx-2,texty+2,width,height,text,0)
  16. bitmap.draw_text(textx,texty+2,width,height,text,0)
  17. bitmap.draw_text(textx+2,texty+2,width,height,text,0)
  18. end
  19. if baseColor
  20. height=normtext[i][4]
  21. text=normtext[i][0]
  22. bitmap.font.color=baseColor
  23. bitmap.draw_text(textx,texty,width,height,text,0)
  24. end
  25. end
  26. end
  27.  
  28. def drawTextExMulti(bitmap,x,y,width,numlines,text,baseColor,shadowColor)
  29. normtext=getLineBrokenChunks(bitmap,text,width,nil,true)
  30. renderMultiLine(bitmap,x,y,normtext,numlines*32,baseColor,shadowColor)
  31. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement