[fltk.general] Re: Fl_Offscreen

GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Fl_Offscreen "holm.h... 01:34 Oct 03 top right image
  Answer to first question is to use
     data_p = fl_read_image(data_p, 0, 0, 120, 120, 0);

What about second question ? Same question for drawing with eg. fl_begin_complex_polygon()

Best regards
Håvard

søndag 3. oktober 2021 kl. 10:09:43 UTC+2 skrev holm.h...@gmail.com:

Hello,

I want to draw using Fl_Offscreen, doing something like:
{
  Fl_Offscreen oscr = fl_create_offscreen(120, 120);

  fl_begin_offscreen(oscr);
  fl_color(FL_BLACK);
  fl_rectf(0, 0, 120, 120);
  fl_color(FL_WHITE);
  fl_rectf(-10, -10, 100, 100);
  fl_end_offscreen();
 
  // print offscreen color at (10, 10)
  fl_delete_offscreen(oscr);
}

Two questions:
1) At the end of this code I want check the color of a given point. How can I do that?
2) I write to outside the pixmap (fl_rectf(-10, -10, 100, 100)), is that ok ?

Best regards
Håvard

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/420f4ce3-57fe-4340-9e00-7fa8c2773390n%40googlegroups.com.
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2021 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.