AlbumShaper  1.0a3
tilt_internal.h
Go to the documentation of this file.
1 //==============================================
2 // copyright : (C) 2003-2005 by Will Stokes
3 //==============================================
4 // This program is free software; you can redistribute it
5 // and/or modify it under the terms of the GNU General
6 // Public License as published by the Free Software
7 // Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //==============================================
10 
11 #ifndef BACKEND_ENHANCEMENTS_TILT_INTERNAL_H
12 #define BACKEND_ENHANCEMENTS_TILT_INTERNAL_H
13 
14 //In orded to prevent roundoff error from propogating
15 //across multiple pixel computations I've created
16 //my own DPoint class that resembles a QPoint but uses doubles instead.
17 class DPoint
18 {
19 public:
20  DPoint();
21  DPoint( double x, double y );
22  double x() const;
23  double y() const;
24 private:
25  double xpos, ypos;
26 };
27 
28 //finds the 2-dimensionally interpolated pixel color
29 //using the supplied double coordinates and image object
30 QRgb interpolatedPixelValue( double xp, double yp, QImage* image );
31 
32 //blends two rgb colors using a weight between 0-1, used by interpolate function
33 QRgb blendColors( QRgb color1, QRgb color2, double alpha );
34 
35 //finds the intersection between two lines described by p1-p2 and p3-p4
37 
38 #endif //BACKEND_ENHANCEMENTS_TILT_INTERNAL_H
QRgb blendColors(QRgb color1, QRgb color2, double alpha)
Definition: tilt.cpp:362
QRgb interpolatedPixelValue(double xp, double yp, QImage *image)
Definition: tilt.cpp:315
DPoint()
Definition: tilt.cpp:450
double xpos
Definition: tilt_internal.h:25
double x() const
Definition: tilt.cpp:459
double y() const
Definition: tilt.cpp:460
DPoint findTwoLineIntersection(DPoint p1, DPoint p2, DPoint p3, DPoint p4)
Definition: tilt.cpp:370
double ypos
Definition: tilt_internal.h:25