Hello David, Unfortunately, LinXtris images are perfect square, so I can't say if it is in reverse order or not.
Regards, Pascal. http://blady.pagesperso-orange.fr Le 2 juin 2015 à 19:52, Rabbi David Botton <[email protected]> a écrit : > Have you tested the actual layout of the pixels by any chance? I guess I > missed that things were in that order. Can you confirm the layout? If not > I'll write a test for it. > > David Botton > > > On Mon, May 11, 2015 at 4:28 AM Pascal <[email protected]> wrote: > 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> ------------------------------------------------------------------------------ _______________________________________________ Gnoga-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gnoga-list
