summaryrefslogtreecommitdiff
path: root/src/Fl_Tiled_Image.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-01 18:03:10 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-07-06 20:28:20 +0200
commitf09e17c3c564e8310125a10c03397cbf473ff643 (patch)
tree8d0fd4a28e3686c33aaa140d07ddba26ab28bdc2 /src/Fl_Tiled_Image.cxx
parentb0e0c355edaa2e23148cb0260ada907aec930f05 (diff)
Remove $Id$ tags, update URL's, and more
- remove obsolete svn '$Id$' tags from all source files - update .fl files and generated files accordingly - replace 'http://www.fltk.org' URL's with 'https://...' - replace bug report URL 'str.php' with 'bugs.php' - remove trailing whitespace - fix other whitespace errors flagged by Git - add and/or fix missing or wrong standard headers - convert tabs to spaces in all source files The only relevant code changes are in the fluid/ folder where some .fl files and other source files were used to generate the '$Id' headers and footers.
Diffstat (limited to 'src/Fl_Tiled_Image.cxx')
-rw-r--r--src/Fl_Tiled_Image.cxx55
1 files changed, 24 insertions, 31 deletions
diff --git a/src/Fl_Tiled_Image.cxx b/src/Fl_Tiled_Image.cxx
index cd0972126..8451e062f 100644
--- a/src/Fl_Tiled_Image.cxx
+++ b/src/Fl_Tiled_Image.cxx
@@ -1,6 +1,4 @@
//
-// "$Id$"
-//
// Tiled image code for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2015 by Bill Spitzak and others.
@@ -9,11 +7,11 @@
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
-// http://www.fltk.org/COPYING.php
+// https://www.fltk.org/COPYING.php
//
-// Please report all bugs and problems on the following page:
+// Please see the following page on how to report bugs and issues:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/bugs.php
//
@@ -54,9 +52,9 @@
\todo Fix Fl_Tiled_Image as background image for widgets and windows
and fix the implementation of Fl::scheme(const char *).
*/
-Fl_Tiled_Image::Fl_Tiled_Image(Fl_Image *i, // I - Image to tile
- int W, // I - Width of tiled area
- int H) : // I - Height of tiled area
+Fl_Tiled_Image::Fl_Tiled_Image(Fl_Image *i, // I - Image to tile
+ int W, // I - Width of tiled area
+ int H) : // I - Height of tiled area
Fl_Image(W,H,0) {
image_ = i;
alloc_image_ = 0;
@@ -79,9 +77,9 @@ Fl_Tiled_Image::Fl_Tiled_Image(Fl_Image *i, // I - Image to tile
// 'Fl_Tiled_Image::copy()' - Copy and resize a tiled image...
//
-Fl_Image * // O - New image
-Fl_Tiled_Image::copy(int W, // I - New width
- int H) { // I - New height
+Fl_Image * // O - New image
+Fl_Tiled_Image::copy(int W, // I - New width
+ int H) { // I - New height
if (W == w() && H == h()) return this;
else return new Fl_Tiled_Image(image_, W, H);
}
@@ -92,8 +90,8 @@ Fl_Tiled_Image::copy(int W, // I - New width
//
void
-Fl_Tiled_Image::color_average(Fl_Color c, // I - Color to blend with
- float i) { // I - Blend fraction
+Fl_Tiled_Image::color_average(Fl_Color c, // I - Color to blend with
+ float i) { // I - Blend fraction
if (!alloc_image_) {
image_ = image_->copy();
alloc_image_ = 1;
@@ -150,20 +148,20 @@ Fl_Tiled_Image::desaturate() {
This may be improved in a later version of the library.
*/
void
-Fl_Tiled_Image::draw(int X, // I - Starting X position
- int Y, // I - Starting Y position
- int W, // I - Width of area to be filled
- int H, // I - Height of area to be filled
- int cx, // I - "Source" X position
- int cy) { // I - "Source" Y position
+Fl_Tiled_Image::draw(int X, // I - Starting X position
+ int Y, // I - Starting Y position
+ int W, // I - Width of area to be filled
+ int H, // I - Height of area to be filled
+ int cx, // I - "Source" X position
+ int cy) { // I - "Source" Y position
- int iw = image_->w(); // effective image width
- int ih = image_->h(); // effective image height
+ int iw = image_->w(); // effective image width
+ int ih = image_->h(); // effective image height
if (!iw || !ih) return;
if (cx >= iw || cy >= ih) return;
- if (cx < 0) cx = 0; // ignore negative values
+ if (cx < 0) cx = 0; // ignore negative values
if (cy < 0) cy = 0;
// W and H null means the image is potentially as large as the current window
@@ -181,22 +179,17 @@ Fl_Tiled_Image::draw(int X, // I - Starting X position
fl_push_clip(X, Y, W, H);
- if (cx > 0) iw -= cx; // crop image
+ if (cx > 0) iw -= cx; // crop image
if (cy > 0) ih -= cy;
for (int yy = Y; yy < H; yy += ih) {
if (fl_not_clipped(X,yy,W,ih)) {
for (int xx = X; xx < W; xx += iw) {
- if (fl_not_clipped(xx,yy,iw,ih)) {
- image_->draw(xx,yy,iw,ih,cx,cy);
- }
+ if (fl_not_clipped(xx,yy,iw,ih)) {
+ image_->draw(xx,yy,iw,ih,cx,cy);
+ }
}
}
}
fl_pop_clip();
}
-
-
-//
-// End of "$Id$".
-//