Prefer fl_push_clip() over fl_clip().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2307 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2002-06-11 20:58:12 +00:00
parent debda040dc
commit 34e35db71f
5 changed files with 16 additions and 13 deletions
+2
View File
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.0 CHANGES IN FLTK 1.1.0
- Documented that fl_push_clip() is preferred over
fl_clip(), with a corresponding source change.
- Minor changes to the MacOS X event handling code. - Minor changes to the MacOS X event handling code.
- Added syntax highlighting example code to the editor - Added syntax highlighting example code to the editor
test program. test program.
+4 -4
View File
@@ -1,5 +1,5 @@
// //
// "$Id: fl_draw.H,v 1.9.2.6.2.5 2002/05/30 15:09:02 easysw Exp $" // "$Id: fl_draw.H,v 1.9.2.6.2.6 2002/06/11 20:58:12 easysw Exp $"
// //
// Portable drawing function header file for the Fast Light Tool Kit (FLTK). // Portable drawing function header file for the Fast Light Tool Kit (FLTK).
// //
@@ -42,8 +42,8 @@ extern FL_EXPORT Fl_Color fl_color_;
inline Fl_Color fl_color() {return fl_color_;} inline Fl_Color fl_color() {return fl_color_;}
// clip: // clip:
FL_EXPORT void fl_clip(int x, int y, int w, int h); FL_EXPORT void fl_push_clip(int x, int y, int w, int h);
#define fl_push_clip fl_clip #define fl_clip fl_push_clip
FL_EXPORT void fl_push_no_clip(); FL_EXPORT void fl_push_no_clip();
FL_EXPORT void fl_pop_clip(); FL_EXPORT void fl_pop_clip();
FL_EXPORT int fl_not_clipped(int x, int y, int w, int h); FL_EXPORT int fl_not_clipped(int x, int y, int w, int h);
@@ -194,5 +194,5 @@ FL_EXPORT int fl_add_symbol(const char* name, void (*drawit)(Fl_Color), int scal
#endif #endif
// //
// End of "$Id: fl_draw.H,v 1.9.2.6.2.5 2002/05/30 15:09:02 easysw Exp $". // End of "$Id: fl_draw.H,v 1.9.2.6.2.6 2002/06/11 20:58:12 easysw Exp $".
// //
+1 -1
View File
@@ -34,7 +34,7 @@ Fl_Double_Window</TT>. </P>
draw()</TT> method that draws the contents. The scrolling is done by draw()</TT> method that draws the contents. The scrolling is done by
changing the <TT>x()</TT> and <TT>y()</TT> of the widget, so this child changing the <TT>x()</TT> and <TT>y()</TT> of the widget, so this child
must use the <TT>x()</TT> and <TT>y()</TT> to position it's drawing. must use the <TT>x()</TT> and <TT>y()</TT> to position it's drawing.
To speed up drawing it should test <A href=drawing.html#fl_clip><TT>fl_clip()</TT></A> To speed up drawing it should test <A href=drawing.html#fl_push_clip><TT>fl_push_clip()</TT></A>
. </P> . </P>
<P>Another very useful child is a single <A href=Fl_Pack.html#Fl_Pack><TT> <P>Another very useful child is a single <A href=Fl_Pack.html#Fl_Pack><TT>
Fl_Pack</TT></A>, which is itself a group that packs it's children Fl_Pack</TT></A>, which is itself a group that packs it's children
+6 -5
View File
@@ -67,18 +67,19 @@ following types of drawing functions:
<H3><A name="clipping">Clipping</A></H3> <H3><A name="clipping">Clipping</A></H3>
<P>You can limit all your drawing to a rectangular region by calling <P>You can limit all your drawing to a rectangular region by calling
<TT>fl_clip</TT>, and put the drawings back by using <TT>fl_pop_clip</TT>. <TT>fl_push_clip</TT>, and put the drawings back by using <TT>fl_pop_clip</TT>.
This rectangle is measured in pixels and is unaffected by the current This rectangle is measured in pixels and is unaffected by the current
transformation matrix. transformation matrix.
<P>In addition, the system may provide clipping when updating windows <P>In addition, the system may provide clipping when updating windows
which may be more complex than a simple rectangle.</P> which may be more complex than a simple rectangle.</P>
<H4><A name="fl_clip">void fl_push_clip(int x, int y, int w, int h)</A><BR> <H4><A name="fl_push_clip">void fl_clip(int x, int y, int w, int h)</A><BR>
void fl_clip(int x, int y, int w, int h)</H4> void fl_push_clip(int x, int y, int w, int h)</H4>
<P>Intersect the current clip region with a rectangle and push this new <P>Intersect the current clip region with a rectangle and push this new
region onto the stack. region onto the stack. The <CODE>fl_clip()</CODE> name is deprecated and
will be removed from future releases.
<H4>void fl_push_no_clip()</H4> <H4>void fl_push_no_clip()</H4>
@@ -93,7 +94,7 @@ region onto the stack.
<TD><B>Note:</B> <TD><B>Note:</B>
<P>You must call <TT>fl_pop_clip()</TT> once for every <P>You must call <TT>fl_pop_clip()</TT> once for every
time you call <TT>fl_clip()</TT>. If you return to FLTK time you call <TT>fl_push_clip()</TT>. If you return to FLTK
with the clip stack not empty unpredictable results with the clip stack not empty unpredictable results
occur. occur.
+3 -3
View File
@@ -1,5 +1,5 @@
// //
// "$Id: fl_rect.cxx,v 1.10.2.4.2.8 2002/03/06 18:11:01 easysw Exp $" // "$Id: fl_rect.cxx,v 1.10.2.4.2.9 2002/06/11 20:58:12 easysw Exp $"
// //
// Rectangle drawing routines for the Fast Light Tool Kit (FLTK). // Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
// //
@@ -379,7 +379,7 @@ Fl_Region fl_clip_region() {
} }
// Intersect & push a new clip rectangle: // Intersect & push a new clip rectangle:
void fl_clip(int x, int y, int w, int h) { void fl_push_clip(int x, int y, int w, int h) {
Fl_Region r; Fl_Region r;
if (w > 0 && h > 0) { if (w > 0 && h > 0) {
r = XRectangleRegion(x,y,w,h); r = XRectangleRegion(x,y,w,h);
@@ -508,5 +508,5 @@ int fl_clip_box(int x, int y, int w, int h, int& X, int& Y, int& W, int& H){
} }
// //
// End of "$Id: fl_rect.cxx,v 1.10.2.4.2.8 2002/03/06 18:11:01 easysw Exp $". // End of "$Id: fl_rect.cxx,v 1.10.2.4.2.9 2002/06/11 20:58:12 easysw Exp $".
// //