Prometheus gets anti-aliasing, improved initialization, scaling and rotations...
by
, 02-10-2010 at 09:17 AM (7529 Views)
Just got some more work in the prometheus interface. Added basic support for Scaling surfaces, rotating them and selectable levels of anti-aliasing/quality. Finished a sample program of the new prometheus interface and here it is: (most of it is comments though)
This is getting close to a 0.1 release of the Prometheus video unit... A few extra weeks and we should be there.Code:program PromVTest; uses Prometheus_Vid, sdl; var Image: pSdl_Surface; begin //init stuff sdl_init(sdl_init_everything); //the prometheus stuff starts here: //make a window with prometheus and set the video modes CreateWindow(640, 480, 32, Sdl_HwSurface); //set prometheus quality levels SetPrometheusAA_Rotating(1); //rotation quality SetPrometheusAA_Scaling(1); //scaling quality SetPrometheusAA_General(1); //quality levels of everything else Image := LoadImage('TestImage.png'); //load image from disk DrawImage(0, 0, RotateImage(40, ScaleImage(0.8, Image))); //draw the rotation of a scaled image. or you could: DrawImage(100, 100, ScaleImage(0.8, RotateImage(40, Image))); //draw the scaled version of a rotated image. Its the same quality either way DrawImage(200, 200, RotoScaleImage(40, 0.8, Image)); //or you can do it all in one. whichever suits you. //Note: RotoScaleImage() uses both AA_Rotating and AA_Scaling settings. Its is the only exception to AA_General Rule UpdateCanvas(); //same as sdl_flip(screen) //wait readln(); end.
cheers,
code_glitch.