Just thought, with all the progress today, that I would open the Prometheus project for the wider community to request features. At the moment I stand poised for some new ideas as basic image functionality seems to be leak free and quite efficient. Plus, I'd like to have some cool stuff in version 0.1 of the video unit and core unit (input, conversions and etc) that I'm planning to make available (source and binary) later this week.
Here is a sample program to date:
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.
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
//And we can also run an image resize like so:
DrawImage(300,300, ResizeImage(50,100, Image));
UpdateCanvas(); //same as sdl_flip(screen)
//wait
readln();
end.
Again, sorry about the coding style, but then again no one likes anyone else's...
And the above program yields the following output (see attached image)
EDIT:
sorry about the atrocious quality, it is much better in real life...
cheers,
code_glitch
Bookmarks