~ubuntu-branches/ubuntu/karmic/fltk1.1/karmic

« back to all changes in this revision

Viewing changes to documentation/drawing.html

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-05-22 13:57:06 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050522135706-mchag24yf42lu7bu
Tags: 1.1.6-5
* Revert previous change, which seems to have been ineffective for some
  reason, in favor of commenting out the problematic Makefile rule
  altogether.  (Closes: #310151.)
* debian/control: Go back to specifying the URL as part of the
  description rather than via a non-standard field that doesn't seem to
  have caught on.  (Closes: #310240.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
746
746
value is non-zero if the dimensions were parsed ok and zero if
747
747
there was any problem.
748
748
 
 
749
<H3>Direct Image Reading</H3>
 
750
 
 
751
<p>FLTK provides a single function for reading from the current
 
752
window or off-screen buffer into a RGB(A) image buffer.</p>
 
753
 
 
754
<H4><A NAME="fl_read_image">uchar *fl_read_image(uchar *p, int
 
755
X, int Y, int W, int H, int alpha = 0);</A></H4>
 
756
 
 
757
<p>Read a RGB(A) image from the current window or off-screen
 
758
buffer. The <tt>p</tt> argument points to a buffer that can hold
 
759
the image and must be at least <tt>W*H*3</tt> bytes when reading
 
760
RGB images and <tt>W*H*4</tt> bytes when reading RGBA images. If
 
761
<tt>NULL</tt>, <tt>fl_read_image()</tt> will create an array of
 
762
the proper size which can be freed using <tt>delete[]</tt>.</p>
 
763
 
 
764
<p>The <tt>alpha</tt> parameter controls whether an alpha
 
765
channel is created and the value that is placed in the alpha
 
766
channel. If 0, no alpha channel is generated.</p>
 
767
 
749
768
<H3><A name="Fl_Image">Image Classes</A></H3>
750
769
 
751
770
<P>FLTK provides a base image class called <A
839
858
<H4>void draw(int x, int y)</H4>
840
859
 
841
860
<P>Draws the image with the upper-left corner at <TT>x,y</TT>.
842
 
This is the same as doing
843
 
<TT>draw(x,y,img->w(),img->h(),0,0)</TT>.
 
861
This is the same as doing <TT>draw(x,y,img->w(),img->h(),0,0)</TT>.
844
862
 
845
863
</BODY>
846
864
</HTML>