From 34e35db71f83d0636e91222f4b2084b9eacdc21e Mon Sep 17 00:00:00 2001
From: Michael R Sweet
Date: Tue, 11 Jun 2002 20:58:12 +0000
Subject: Prefer fl_push_clip() over fl_clip().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2307 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
---
CHANGES | 2 ++
FL/fl_draw.H | 8 ++++----
documentation/Fl_Scroll.html | 2 +-
documentation/drawing.html | 11 ++++++-----
src/fl_rect.cxx | 6 +++---
5 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/CHANGES b/CHANGES
index 1cd9028a9..8cee5e99f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
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.
- Added syntax highlighting example code to the editor
test program.
diff --git a/FL/fl_draw.H b/FL/fl_draw.H
index ec1317973..9d0149136 100644
--- a/FL/fl_draw.H
+++ b/FL/fl_draw.H
@@ -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).
//
@@ -42,8 +42,8 @@ extern FL_EXPORT Fl_Color fl_color_;
inline Fl_Color fl_color() {return fl_color_;}
// clip:
-FL_EXPORT void fl_clip(int x, int y, int w, int h);
-#define fl_push_clip fl_clip
+FL_EXPORT void fl_push_clip(int x, int y, int w, int h);
+#define fl_clip fl_push_clip
FL_EXPORT void fl_push_no_clip();
FL_EXPORT void fl_pop_clip();
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
//
-// 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 $".
//
diff --git a/documentation/Fl_Scroll.html b/documentation/Fl_Scroll.html
index 5b68214ab..2e8a17fb4 100644
--- a/documentation/Fl_Scroll.html
+++ b/documentation/Fl_Scroll.html
@@ -34,7 +34,7 @@ Fl_Double_Window.
draw() method that draws the contents. The scrolling is done by
changing the x() and y() of the widget, so this child
must use the x() and y() to position it's drawing.
- To speed up drawing it should test fl_clip()
+ To speed up drawing it should test fl_push_clip()
.
Another very useful child is a single
Fl_Pack, which is itself a group that packs it's children
diff --git a/documentation/drawing.html b/documentation/drawing.html
index 12e4cb13f..2a8a99d5e 100644
--- a/documentation/drawing.html
+++ b/documentation/drawing.html
@@ -67,18 +67,19 @@ following types of drawing functions:
You can limit all your drawing to a rectangular region by calling
-fl_clip, and put the drawings back by using fl_pop_clip.
+fl_push_clip, and put the drawings back by using fl_pop_clip.
This rectangle is measured in pixels and is unaffected by the current
transformation matrix.
In addition, the system may provide clipping when updating windows
which may be more complex than a simple rectangle.
-
+
Intersect the current clip region with a rectangle and push this new
-region onto the stack.
+region onto the stack. The fl_clip() name is deprecated and
+will be removed from future releases.
void fl_push_no_clip()
@@ -93,7 +94,7 @@ region onto the stack.
Note:
You must call fl_pop_clip() once for every
- time you call fl_clip(). If you return to FLTK
+ time you call fl_push_clip(). If you return to FLTK
with the clip stack not empty unpredictable results
occur.
diff --git a/src/fl_rect.cxx b/src/fl_rect.cxx
index 20ca1563a..c0eab0f79 100644
--- a/src/fl_rect.cxx
+++ b/src/fl_rect.cxx
@@ -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).
//
@@ -379,7 +379,7 @@ Fl_Region fl_clip_region() {
}
// 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;
if (w > 0 && h > 0) {
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 $".
//
--
cgit v1.2.3
|