pixmap_01.bmx 546 B

1234567891011121314151617181920212223242526272829
  1. Rem
  2. This test checks:
  3. - creation and modification of pixmaps work
  4. End Rem
  5. SuperStrict
  6. Framework BRL.StandardIO
  7. Import Brl.Pixmap
  8. local pix:TPixmap = CreatePixmap(50,50, PF_RGBA8888)
  9. local res:int = TRUE
  10. 'blackout
  11. pix.ClearPixels(0)
  12. For local x:int = 0 until pix.width
  13. For local y:int = 0 until pix.height
  14. pix.WritePixel(x,y, y*2)
  15. Next
  16. Next
  17. For local x:int = 0 until pix.width
  18. For local y:int = 0 until pix.height
  19. if y*2 <> pix.ReadPixel(x,y)
  20. res = FALSE
  21. exit
  22. endif
  23. Next
  24. Next
  25. print "success: "+res