Hello, another question:

How are arranged the pixels in Gnoga.Types.Pixel_Data_Type?
type Pixel_Data_Type is array (Positive range <>, Positive range <>) of 
Pixel_Type; -- no more documentation

I assume width then height as in Create_Image_Data:
         Image := new Gnoga.Types.Pixel_Data_Type (1 .. XPM_Header.Width, 1 .. 
XPM_Header.Height);

But http://www.w3.org/TR/2dcontext/#canvas-pixel-arraybuffer says:
"A Canvas Pixel ArrayBuffer is an ArrayBuffer that whose data is represented in 
left-to-right order, row by row top to bottom, starting with the top left, with 
each pixel's red, green, blue, and alpha components being given in that order 
for each pixel."

So I'm quite lost, I should improve my English ;-)
Is my declaration of Image correct?

Thanks, Pascal.
http://blady.pagesperso-orange.fr


Le 28 avr. 2015 à 18:45, Pascal <[email protected]> a écrit :

> Hello,
> 
> After LinXtris port from GTKAda 2 to GTKAda 3 (needed to have a running 
> reference), the port to GNOGA is near to the end of rough translation phase.
> The layout is as good as I can do with my GNOGA knowledge, see attached 
> screen capture.
> 
> But, the speed of animation is quite deceiving.
> I guess display procedure is not good (commented code lines are GTKAda) :
> 
>    procedure Paint_Block (X : Integer; Y : Integer; Color : 
> Block_Engine.Color) is
>       Cr     : Gnoga.Gui.Element.Canvas.Context_2D.Context_2D_Type;
>       Image  : Gnoga.Gui.Element.Canvas.Context_2D.Image_Data_Type;
>       Pixels : Gnoga_Extras.Pixel_Data_Access;
>    begin
> --        Cr := Cairo.Create (Get_Pixmap (Main_Window.Game_Screen));
>       Cr.Get_Drawing_Context_2D (Main_Window.Game_Screen);
> --        Gdk.Cairo.Set_Source_Pixbuf
> --          (Cr,
> --           Color_To_Pix (Color),
> --           Gdouble (X_Drawing_Coordinate (X)),
> --           Gdouble (Y_Drawing_Coordinate (Y)));
>       Pixels := Color_To_Pix (Color);
>       Cr.Create_Image_Data (Image, Pixels'Length (1), Pixels'Length (2));
>       Image.Data (Pixels.all);
> --        Cairo.Paint (Cr);
>       Cr.Put_Image_Data (Image, X_Drawing_Coordinate (X), 
> Y_Drawing_Coordinate (Y));
> --        Cairo.Destroy (Cr);
>    end Paint_Block;
> 
> Comments will be fully appreciated.
> 
> I have mailed the author via SourceForge without success for code 
> distributing.
> 
> Regards, Pascal.
> http://blady.pagesperso-orange.fr
> 
> <Capture d’écran 2015-04-28 à 10.26.00.png>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud 
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Gnoga-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gnoga-list


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Gnoga-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to