Results 1 to 9 of 9

Thread: Prometheus Development Thread

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45

    Prometheus Development Thread

    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
    Attached Images Attached Images
    Last edited by code_glitch; 02-10-2010 at 05:24 PM.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •