Re: Pixelbuffer to draw on a surface

2015-12-07 Thread TheDGuy via Digitalmars-d-learn
On Sunday, 6 December 2015 at 13:32:19 UTC, visitor wrote: gtkd demos for examples, might be of interest, like clock : https://github.com/gtkd-developers/GtkD/blob/master/demos/cairo/cairo_clock/clock.d Thanks! I didn't knew about that source, that helped me alot :)

Re: Pixelbuffer to draw on a surface

2015-12-06 Thread visitor via Digitalmars-d-learn
gtkd demos for examples, might be of interest, like clock : https://github.com/gtkd-developers/GtkD/blob/master/demos/cairo/cairo_clock/clock.d

Re: Pixelbuffer to draw on a surface

2015-12-04 Thread TheDGuy via Digitalmars-d-learn
Thanks for your answers. I think Cairo is the right way but i have a hard time to translate any of those C++ or Python tutorials to D, my current code: import gtk.Main; import gtk.MainWindow; import gtk.DrawingArea; import gdk.Cairo; import gtk.Widget; void main(string[] args){

Pixelbuffer to draw on a surface

2015-11-30 Thread TheDGuy via Digitalmars-d-learn
Hi, is there any possibility, to draw with a pixelbuffer to a surface (for example with GTKD) and to update it every few milliseconds?

Re: Pixelbuffer to draw on a surface

2015-11-30 Thread lobo via Digitalmars-d-learn
On Monday, 30 November 2015 at 08:37:04 UTC, TheDGuy wrote: Hi, is there any possibility, to draw with a pixelbuffer to a surface (for example with GTKD) and to update it every few milliseconds? Are any of these suitable for your needs? https://github.com/DerelictOrg/DerelictSDL2

Re: Pixelbuffer to draw on a surface

2015-11-30 Thread TheDGuy via Digitalmars-d-learn
On Monday, 30 November 2015 at 09:09:00 UTC, lobo wrote: On Monday, 30 November 2015 at 08:37:04 UTC, TheDGuy wrote: Hi, is there any possibility, to draw with a pixelbuffer to a surface (for example with GTKD) and to update it every few milliseconds? Are any of these suitable for your

Re: Pixelbuffer to draw on a surface

2015-11-30 Thread visitor via Digitalmars-d-learn
but there is no specific solution inside GTKD? for example, in pseudo code auto surf = new Surface(...); // look for cairo.Surface doc auto cr = cairo.Context.Context.create(surf); // pb is an existing gdkpixbuf.Pixbuf gdk.Cairo.setSourcePixbuf(cr, pb, width, height); cr.paint(); adding

Re: Pixelbuffer to draw on a surface

2015-11-30 Thread drug via Digitalmars-d-learn
On 30.11.2015 16:09, drug wrote: On 30.11.2015 15:49, TheDGuy wrote: On Monday, 30 November 2015 at 09:09:00 UTC, lobo wrote: On Monday, 30 November 2015 at 08:37:04 UTC, TheDGuy wrote: Hi, is there any possibility, to draw with a pixelbuffer to a surface (for example with GTKD) and to update

Re: Pixelbuffer to draw on a surface

2015-11-30 Thread drug via Digitalmars-d-learn
On 30.11.2015 15:49, TheDGuy wrote: On Monday, 30 November 2015 at 09:09:00 UTC, lobo wrote: On Monday, 30 November 2015 at 08:37:04 UTC, TheDGuy wrote: Hi, is there any possibility, to draw with a pixelbuffer to a surface (for example with GTKD) and to update it every few milliseconds? Are