!@E!@#!@#

git-svn-id: svn://10.0.0.236/trunk@84937 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pavlov%netscape.com 2001-01-14 05:31:26 +00:00
parent b4019decae
commit fd39708481
3 changed files with 14 additions and 9 deletions

View File

@ -75,23 +75,23 @@ struct nsPoint2 {
* @author Don Cone <dcone@netscape.com> (3/29/00)
* @version 0.0
*/
struct nsPathPoint: public nsPoint2{
struct nsPathPoint2: public nsPoint2{
PRBool mIsOnCurve;
// Constructors
nsPathPoint() {}
nsPathPoint(const nsPathPoint& aPoint) {
nsPathPoint2() {}
nsPathPoint2(const nsPathPoint2& aPoint) {
x = aPoint.x;
y = aPoint.y;
mIsOnCurve = aPoint.mIsOnCurve;
}
nsPathPoint(gfx_coord aX, gfx_coord aY) {
nsPathPoint2(gfx_coord aX, gfx_coord aY) {
x = aX;
y = aY;
mIsOnCurve = PR_TRUE;
}
nsPathPoint(gfx_coord aX, gfx_coord aY, PRBool aIsOnCurve) {
nsPathPoint2(gfx_coord aX, gfx_coord aY, PRBool aIsOnCurve) {
x = aX;
y = aY;
mIsOnCurve = aIsOnCurve;

View File

@ -42,21 +42,26 @@
* @ingroup conversion_constants
* @note XXX this should be derived from platform FLOAT_MIN
*/
#define ROUND_EXCLUSIVE_CONST_FLOAT 0.4999999999999999
#ifndef ROUND_EXCLUSIVE_CONST_FLOAT
#define ROUND_EXCLUSIVE_CONST_FLOAT 0.499999999
#endif
/**
* ROUND_CONST_FLOAT
* @ingroup conversion_constants
*/
#ifndef ROUND_CONST_FLOAT
#define ROUND_CONST_FLOAT 0.5
#endif
/**
* CEIL_CONST_FLOAT
* @ingroup conversion_constants
* @note XXX this should be derived from platform FLOAT_MIN
*/
#ifndef CEIL_CONST_FLOAT
#define CEIL_CONST_FLOAT 0.99999999
#endif
/**
* gfx_coord rounding, floor, ceil functions
@ -72,7 +77,7 @@
*/
inline gfx_coord GFXCoordAbs(gfx_coord aValue)
{
return fabs(aValue);
return gfx_coord(fabs(aValue));
}

View File

@ -214,7 +214,7 @@ NS_IMETHODIMP nsImage::GetFormat(gfx_format *aFormat)
mBHead->biWidth = GFXCoordToIntCeil(mSize.width);
mBHead->biHeight = -GFXCoordToIntCeil(mSize.height);
mBHead->biPlanes = 1;
mBHead->biBitCount = 24;
mBHead->biBitCount = mDepth;
mBHead->biCompression = BI_RGB;
mBHead->biSizeImage = mBitsLength; // not compressed, so we dont need this to be set
mBHead->biXPelsPerMeter = 0;