Advertisement
DaxSoft

overSave #Bitmap

Nov 19th, 2014
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. # By: Dax | Requer: Dax Core
  2. # Testando..
  3. # O comando para se usar é esse: NÃO ESQUEÇA DE ESPECIFICAR ÀS PASTAS.
  4. # Bitmap.overSave(nome da nova imagem, nome da primeira imagem, nomes das imagens)
  5. # exemplo: Bitmap.overSave("Pictures/Nova", "Pictures/1", "Characters/2",
  6. # "Pictures/3", "Characters/4", "Pictures/5")
  7. class Bitmap
  8. def self.overSave(newfile, first, *args)
  9. return if first.empty? || first.nil? || args.empty? || args.nil?
  10. firstB = Bitmap.new("Graphics/"+first)
  11. args.each { |outhers|
  12. firstB.stretch_blt(firstB.rect, Bitmap.new("Graphics/"+outhers), firstB.rect)
  13. }
  14. firstB.save("Graphics/"+newfile)
  15. end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement