Ich möchte gern ein im Programm erstelltes Rechteck um jeweils 90° b.z.w 180° drehen und dabei die gleiche Qualität beibehalten. Dieses will ich dann mit Grabsprite in eine neues Sprite kopieren.
Bei RotoSprite ist immer ein kleiner Qualitätsverlust.
Bei 90° drehungen müste es doch 1:1 gehen ?
Try
SMOOTHSHADING FALSE
before you draw the sprite.
Moru´s advice should get you a perfect quality square rotation.
You can always get the image info into an array and rotate it yourself, although I have just a slight idea on that, and at the final, it will look the same.
Habe es so gelöst in dem ich die Matrix gedreht habe.
SPRITE2MEM(pix[], Feld.Img)
// Drehen um 90° rechts
LOCAL a%, b%, tmp%[] ; DIM tmp[w% * h%]
FOR y% = 0 TO h-1
FOR x% = 0 TO w-1
b = h-1-y + x * h ; a = w * y + x
tmp = pix[a]
NEXT
NEXT
MEM2SPRITE(tmp[], Feld.Img, h,w)
Quote from: mull on 2011-Dec-13
Habe es so gelöst in dem ich die Matrix gedreht habe.
SPRITE2MEM(pix[], Feld.Img)
// Drehen um 90° rechts
LOCAL a%, b%, tmp%[] ; DIM tmp[w*h]
FOR y = 0 TO h-1
FOR x = 0 TO w-1
b = h-1-y + x * h ; a = w * y + x
tmp = pix[a]
NEXT
NEXT
MEM2SPRITE(tmp[], Feld.Img, h,w)
FREAK! :D