2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
|
|
|
/* representation of length values in computed style data */
|
|
|
|
|
|
|
|
#include "nsStyleCoord.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsCRT.h"
|
2008-09-30 22:50:52 -07:00
|
|
|
#include "prlog.h"
|
2009-11-02 11:36:43 -08:00
|
|
|
#include "nsMathUtils.h"
|
2010-07-02 21:18:55 -07:00
|
|
|
#include "nsStyleContext.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
nsStyleCoord::nsStyleCoord(nsStyleUnit aUnit)
|
|
|
|
: mUnit(aUnit)
|
|
|
|
{
|
|
|
|
NS_ASSERTION(aUnit < eStyleUnit_Percent, "not a valueless unit");
|
|
|
|
if (aUnit >= eStyleUnit_Percent) {
|
|
|
|
mUnit = eStyleUnit_Null;
|
|
|
|
}
|
|
|
|
mValue.mInt = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
nsStyleCoord::nsStyleCoord(PRInt32 aValue, nsStyleUnit aUnit)
|
|
|
|
: mUnit(aUnit)
|
|
|
|
{
|
|
|
|
//if you want to pass in eStyleUnit_Coord, don't. instead, use the
|
|
|
|
//constructor just above this one... MMP
|
2007-05-10 23:00:26 -07:00
|
|
|
NS_ASSERTION((aUnit == eStyleUnit_Enumerated) ||
|
2007-03-22 10:30:00 -07:00
|
|
|
(aUnit == eStyleUnit_Integer), "not an int value");
|
2007-05-10 23:00:26 -07:00
|
|
|
if ((aUnit == eStyleUnit_Enumerated) ||
|
2007-03-22 10:30:00 -07:00
|
|
|
(aUnit == eStyleUnit_Integer)) {
|
|
|
|
mValue.mInt = aValue;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
mUnit = eStyleUnit_Null;
|
|
|
|
mValue.mInt = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
nsStyleCoord::nsStyleCoord(float aValue, nsStyleUnit aUnit)
|
|
|
|
: mUnit(aUnit)
|
|
|
|
{
|
2009-11-02 11:36:43 -08:00
|
|
|
if (aUnit < eStyleUnit_Percent || aUnit >= eStyleUnit_Coord) {
|
|
|
|
NS_NOTREACHED("not a float value");
|
|
|
|
Reset();
|
|
|
|
} else {
|
2007-03-22 10:30:00 -07:00
|
|
|
mValue.mFloat = aValue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-07-02 21:18:55 -07:00
|
|
|
// FIXME: In C++0x we can rely on the default copy constructor since
|
|
|
|
// default copy construction is defined properly for unions. But when
|
|
|
|
// can we actually use that? (It seems to work in gcc 4.4.)
|
2007-03-22 10:30:00 -07:00
|
|
|
nsStyleCoord& nsStyleCoord::operator=(const nsStyleCoord& aCopy)
|
|
|
|
{
|
|
|
|
mUnit = aCopy.mUnit;
|
|
|
|
if ((eStyleUnit_Percent <= mUnit) && (mUnit < eStyleUnit_Coord)) {
|
|
|
|
mValue.mFloat = aCopy.mValue.mFloat;
|
|
|
|
}
|
2010-09-11 09:27:13 -07:00
|
|
|
else if (IsPointerValue()) {
|
2010-07-02 21:18:55 -07:00
|
|
|
mValue.mPointer = aCopy.mValue.mPointer;
|
|
|
|
}
|
2007-03-22 10:30:00 -07:00
|
|
|
else {
|
|
|
|
mValue.mInt = aCopy.mValue.mInt;
|
|
|
|
}
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool nsStyleCoord::operator==(const nsStyleCoord& aOther) const
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2010-08-31 09:05:12 -07:00
|
|
|
if (mUnit != aOther.mUnit) {
|
2011-10-17 07:59:28 -07:00
|
|
|
return false;
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
2010-08-31 09:05:12 -07:00
|
|
|
switch (mUnit) {
|
|
|
|
case eStyleUnit_Null:
|
|
|
|
case eStyleUnit_Normal:
|
|
|
|
case eStyleUnit_Auto:
|
|
|
|
case eStyleUnit_None:
|
2011-10-17 07:59:28 -07:00
|
|
|
return true;
|
2010-08-31 09:05:12 -07:00
|
|
|
case eStyleUnit_Percent:
|
|
|
|
case eStyleUnit_Factor:
|
|
|
|
case eStyleUnit_Degree:
|
|
|
|
case eStyleUnit_Grad:
|
|
|
|
case eStyleUnit_Radian:
|
2012-02-03 21:01:23 -08:00
|
|
|
case eStyleUnit_Turn:
|
2010-08-31 09:05:12 -07:00
|
|
|
return mValue.mFloat == aOther.mValue.mFloat;
|
|
|
|
case eStyleUnit_Coord:
|
|
|
|
case eStyleUnit_Integer:
|
|
|
|
case eStyleUnit_Enumerated:
|
|
|
|
return mValue.mInt == aOther.mValue.mInt;
|
|
|
|
case eStyleUnit_Calc:
|
2010-09-11 09:27:13 -07:00
|
|
|
return *this->GetCalcValue() == *aOther.GetCalcValue();
|
2010-08-31 09:05:12 -07:00
|
|
|
}
|
2011-10-17 07:59:28 -07:00
|
|
|
NS_ABORT_IF_FALSE(false, "unexpected unit");
|
|
|
|
return false;
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
2010-05-11 08:49:44 -07:00
|
|
|
void nsStyleCoord::Reset()
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
mUnit = eStyleUnit_Null;
|
|
|
|
mValue.mInt = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void nsStyleCoord::SetCoordValue(nscoord aValue)
|
|
|
|
{
|
|
|
|
mUnit = eStyleUnit_Coord;
|
|
|
|
mValue.mInt = aValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
void nsStyleCoord::SetIntValue(PRInt32 aValue, nsStyleUnit aUnit)
|
|
|
|
{
|
2007-05-10 23:00:26 -07:00
|
|
|
NS_ASSERTION((aUnit == eStyleUnit_Enumerated) ||
|
2007-03-22 10:30:00 -07:00
|
|
|
(aUnit == eStyleUnit_Integer), "not an int value");
|
2007-05-10 23:00:26 -07:00
|
|
|
if ((aUnit == eStyleUnit_Enumerated) ||
|
2007-03-22 10:30:00 -07:00
|
|
|
(aUnit == eStyleUnit_Integer)) {
|
|
|
|
mUnit = aUnit;
|
|
|
|
mValue.mInt = aValue;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
Reset();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void nsStyleCoord::SetPercentValue(float aValue)
|
|
|
|
{
|
|
|
|
mUnit = eStyleUnit_Percent;
|
|
|
|
mValue.mFloat = aValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
void nsStyleCoord::SetFactorValue(float aValue)
|
|
|
|
{
|
|
|
|
mUnit = eStyleUnit_Factor;
|
|
|
|
mValue.mFloat = aValue;
|
|
|
|
}
|
|
|
|
|
2009-11-02 11:36:43 -08:00
|
|
|
void nsStyleCoord::SetAngleValue(float aValue, nsStyleUnit aUnit)
|
|
|
|
{
|
|
|
|
if (aUnit == eStyleUnit_Degree ||
|
|
|
|
aUnit == eStyleUnit_Grad ||
|
2012-02-03 21:01:23 -08:00
|
|
|
aUnit == eStyleUnit_Radian ||
|
|
|
|
aUnit == eStyleUnit_Turn) {
|
2009-11-02 11:36:43 -08:00
|
|
|
mUnit = aUnit;
|
|
|
|
mValue.mFloat = aValue;
|
|
|
|
} else {
|
|
|
|
NS_NOTREACHED("not an angle value");
|
|
|
|
Reset();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-11 09:27:13 -07:00
|
|
|
void nsStyleCoord::SetCalcValue(Calc* aValue)
|
2010-07-02 21:18:55 -07:00
|
|
|
{
|
2010-09-11 09:27:13 -07:00
|
|
|
mUnit = eStyleUnit_Calc;
|
|
|
|
mValue.mPointer = aValue;
|
2010-07-02 21:18:55 -07:00
|
|
|
}
|
|
|
|
|
2010-05-11 08:49:44 -07:00
|
|
|
void nsStyleCoord::SetNormalValue()
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
mUnit = eStyleUnit_Normal;
|
|
|
|
mValue.mInt = 0;
|
|
|
|
}
|
|
|
|
|
2010-05-11 08:49:44 -07:00
|
|
|
void nsStyleCoord::SetAutoValue()
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
mUnit = eStyleUnit_Auto;
|
|
|
|
mValue.mInt = 0;
|
|
|
|
}
|
|
|
|
|
2010-05-11 08:49:44 -07:00
|
|
|
void nsStyleCoord::SetNoneValue()
|
2007-05-10 23:01:31 -07:00
|
|
|
{
|
|
|
|
mUnit = eStyleUnit_None;
|
|
|
|
mValue.mInt = 0;
|
|
|
|
}
|
|
|
|
|
2009-11-02 11:36:43 -08:00
|
|
|
// accessors that are not inlined
|
|
|
|
|
|
|
|
double
|
|
|
|
nsStyleCoord::GetAngleValueInRadians() const
|
|
|
|
{
|
|
|
|
double angle = mValue.mFloat;
|
|
|
|
|
|
|
|
switch (GetUnit()) {
|
|
|
|
case eStyleUnit_Radian: return angle;
|
2012-02-03 21:01:23 -08:00
|
|
|
case eStyleUnit_Turn: return angle * 2 * M_PI;
|
2009-11-02 11:36:43 -08:00
|
|
|
case eStyleUnit_Degree: return angle * M_PI / 180.0;
|
|
|
|
case eStyleUnit_Grad: return angle * M_PI / 200.0;
|
|
|
|
|
|
|
|
default:
|
|
|
|
NS_NOTREACHED("unrecognized angular unit");
|
|
|
|
return 0.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-09-30 22:50:52 -07:00
|
|
|
// used by nsStyleSides and nsStyleCorners
|
|
|
|
#define COMPARE_INDEXED_COORD(i) \
|
|
|
|
PR_BEGIN_MACRO \
|
|
|
|
if (mUnits[i] != aOther.mUnits[i]) \
|
2011-10-17 07:59:28 -07:00
|
|
|
return false; \
|
2008-09-30 22:50:52 -07:00
|
|
|
if ((eStyleUnit_Percent <= mUnits[i]) && \
|
|
|
|
(mUnits[i] < eStyleUnit_Coord)) { \
|
|
|
|
if (mValues[i].mFloat != aOther.mValues[i].mFloat) \
|
2011-10-17 07:59:28 -07:00
|
|
|
return false; \
|
2008-09-30 22:50:52 -07:00
|
|
|
} \
|
|
|
|
else { \
|
|
|
|
if (mValues[i].mInt != aOther.mValues[i].mInt) \
|
2011-10-17 07:59:28 -07:00
|
|
|
return false; \
|
2008-09-30 22:50:52 -07:00
|
|
|
} \
|
|
|
|
PR_END_MACRO
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
|
2010-05-11 08:49:44 -07:00
|
|
|
nsStyleSides::nsStyleSides()
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
memset(this, 0x00, sizeof(nsStyleSides));
|
|
|
|
}
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool nsStyleSides::operator==(const nsStyleSides& aOther) const
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
2008-09-30 22:50:52 -07:00
|
|
|
NS_FOR_CSS_SIDES(i) {
|
|
|
|
COMPARE_INDEXED_COORD(i);
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
2011-10-17 07:59:28 -07:00
|
|
|
return true;
|
2007-03-22 10:30:00 -07:00
|
|
|
}
|
|
|
|
|
2010-05-11 08:49:44 -07:00
|
|
|
void nsStyleSides::Reset()
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
memset(this, 0x00, sizeof(nsStyleSides));
|
|
|
|
}
|
|
|
|
|
2008-09-30 22:50:52 -07:00
|
|
|
nsStyleCorners::nsStyleCorners()
|
|
|
|
{
|
|
|
|
memset(this, 0x00, sizeof(nsStyleCorners));
|
|
|
|
}
|
|
|
|
|
2011-09-28 23:19:26 -07:00
|
|
|
bool
|
2008-09-30 22:50:52 -07:00
|
|
|
nsStyleCorners::operator==(const nsStyleCorners& aOther) const
|
|
|
|
{
|
|
|
|
NS_FOR_CSS_HALF_CORNERS(i) {
|
|
|
|
COMPARE_INDEXED_COORD(i);
|
|
|
|
}
|
2011-10-17 07:59:28 -07:00
|
|
|
return true;
|
2008-09-30 22:50:52 -07:00
|
|
|
}
|
|
|
|
|
2010-05-11 08:49:44 -07:00
|
|
|
void nsStyleCorners::Reset()
|
2008-09-30 22:50:52 -07:00
|
|
|
{
|
|
|
|
memset(this, 0x00, sizeof(nsStyleCorners));
|
|
|
|
}
|
|
|
|
|
|
|
|
// Validation of NS_SIDE_IS_VERTICAL and NS_HALF_CORNER_IS_X.
|
|
|
|
#define CASE(side, result) \
|
|
|
|
PR_STATIC_ASSERT(NS_SIDE_IS_VERTICAL(side) == result)
|
2011-10-17 07:59:28 -07:00
|
|
|
CASE(NS_SIDE_TOP, false);
|
|
|
|
CASE(NS_SIDE_RIGHT, true);
|
|
|
|
CASE(NS_SIDE_BOTTOM, false);
|
|
|
|
CASE(NS_SIDE_LEFT, true);
|
2008-09-30 22:50:52 -07:00
|
|
|
#undef CASE
|
|
|
|
|
|
|
|
#define CASE(corner, result) \
|
|
|
|
PR_STATIC_ASSERT(NS_HALF_CORNER_IS_X(corner) == result)
|
2011-10-17 07:59:28 -07:00
|
|
|
CASE(NS_CORNER_TOP_LEFT_X, true);
|
|
|
|
CASE(NS_CORNER_TOP_LEFT_Y, false);
|
|
|
|
CASE(NS_CORNER_TOP_RIGHT_X, true);
|
|
|
|
CASE(NS_CORNER_TOP_RIGHT_Y, false);
|
|
|
|
CASE(NS_CORNER_BOTTOM_RIGHT_X, true);
|
|
|
|
CASE(NS_CORNER_BOTTOM_RIGHT_Y, false);
|
|
|
|
CASE(NS_CORNER_BOTTOM_LEFT_X, true);
|
|
|
|
CASE(NS_CORNER_BOTTOM_LEFT_Y, false);
|
2008-09-30 22:50:52 -07:00
|
|
|
#undef CASE
|
|
|
|
|
|
|
|
// Validation of NS_HALF_TO_FULL_CORNER.
|
|
|
|
#define CASE(corner, result) \
|
|
|
|
PR_STATIC_ASSERT(NS_HALF_TO_FULL_CORNER(corner) == result)
|
|
|
|
CASE(NS_CORNER_TOP_LEFT_X, NS_CORNER_TOP_LEFT);
|
|
|
|
CASE(NS_CORNER_TOP_LEFT_Y, NS_CORNER_TOP_LEFT);
|
|
|
|
CASE(NS_CORNER_TOP_RIGHT_X, NS_CORNER_TOP_RIGHT);
|
|
|
|
CASE(NS_CORNER_TOP_RIGHT_Y, NS_CORNER_TOP_RIGHT);
|
|
|
|
CASE(NS_CORNER_BOTTOM_RIGHT_X, NS_CORNER_BOTTOM_RIGHT);
|
|
|
|
CASE(NS_CORNER_BOTTOM_RIGHT_Y, NS_CORNER_BOTTOM_RIGHT);
|
|
|
|
CASE(NS_CORNER_BOTTOM_LEFT_X, NS_CORNER_BOTTOM_LEFT);
|
|
|
|
CASE(NS_CORNER_BOTTOM_LEFT_Y, NS_CORNER_BOTTOM_LEFT);
|
|
|
|
#undef CASE
|
|
|
|
|
|
|
|
// Validation of NS_FULL_TO_HALF_CORNER.
|
|
|
|
#define CASE(corner, vert, result) \
|
|
|
|
PR_STATIC_ASSERT(NS_FULL_TO_HALF_CORNER(corner, vert) == result)
|
2011-10-17 07:59:28 -07:00
|
|
|
CASE(NS_CORNER_TOP_LEFT, false, NS_CORNER_TOP_LEFT_X);
|
|
|
|
CASE(NS_CORNER_TOP_LEFT, true, NS_CORNER_TOP_LEFT_Y);
|
|
|
|
CASE(NS_CORNER_TOP_RIGHT, false, NS_CORNER_TOP_RIGHT_X);
|
|
|
|
CASE(NS_CORNER_TOP_RIGHT, true, NS_CORNER_TOP_RIGHT_Y);
|
|
|
|
CASE(NS_CORNER_BOTTOM_RIGHT, false, NS_CORNER_BOTTOM_RIGHT_X);
|
|
|
|
CASE(NS_CORNER_BOTTOM_RIGHT, true, NS_CORNER_BOTTOM_RIGHT_Y);
|
|
|
|
CASE(NS_CORNER_BOTTOM_LEFT, false, NS_CORNER_BOTTOM_LEFT_X);
|
|
|
|
CASE(NS_CORNER_BOTTOM_LEFT, true, NS_CORNER_BOTTOM_LEFT_Y);
|
2008-09-30 22:50:52 -07:00
|
|
|
#undef CASE
|
|
|
|
|
|
|
|
// Validation of NS_SIDE_TO_{FULL,HALF}_CORNER.
|
|
|
|
#define CASE(side, second, result) \
|
|
|
|
PR_STATIC_ASSERT(NS_SIDE_TO_FULL_CORNER(side, second) == result)
|
2011-10-17 07:59:28 -07:00
|
|
|
CASE(NS_SIDE_TOP, false, NS_CORNER_TOP_LEFT);
|
|
|
|
CASE(NS_SIDE_TOP, true, NS_CORNER_TOP_RIGHT);
|
2008-09-30 22:50:52 -07:00
|
|
|
|
2011-10-17 07:59:28 -07:00
|
|
|
CASE(NS_SIDE_RIGHT, false, NS_CORNER_TOP_RIGHT);
|
|
|
|
CASE(NS_SIDE_RIGHT, true, NS_CORNER_BOTTOM_RIGHT);
|
2008-09-30 22:50:52 -07:00
|
|
|
|
2011-10-17 07:59:28 -07:00
|
|
|
CASE(NS_SIDE_BOTTOM, false, NS_CORNER_BOTTOM_RIGHT);
|
|
|
|
CASE(NS_SIDE_BOTTOM, true, NS_CORNER_BOTTOM_LEFT);
|
2008-09-30 22:50:52 -07:00
|
|
|
|
2011-10-17 07:59:28 -07:00
|
|
|
CASE(NS_SIDE_LEFT, false, NS_CORNER_BOTTOM_LEFT);
|
|
|
|
CASE(NS_SIDE_LEFT, true, NS_CORNER_TOP_LEFT);
|
2008-09-30 22:50:52 -07:00
|
|
|
#undef CASE
|
|
|
|
|
|
|
|
#define CASE(side, second, parallel, result) \
|
|
|
|
PR_STATIC_ASSERT(NS_SIDE_TO_HALF_CORNER(side, second, parallel) == result)
|
2011-10-17 07:59:28 -07:00
|
|
|
CASE(NS_SIDE_TOP, false, true, NS_CORNER_TOP_LEFT_X);
|
|
|
|
CASE(NS_SIDE_TOP, false, false, NS_CORNER_TOP_LEFT_Y);
|
|
|
|
CASE(NS_SIDE_TOP, true, true, NS_CORNER_TOP_RIGHT_X);
|
|
|
|
CASE(NS_SIDE_TOP, true, false, NS_CORNER_TOP_RIGHT_Y);
|
|
|
|
|
|
|
|
CASE(NS_SIDE_RIGHT, false, false, NS_CORNER_TOP_RIGHT_X);
|
|
|
|
CASE(NS_SIDE_RIGHT, false, true, NS_CORNER_TOP_RIGHT_Y);
|
|
|
|
CASE(NS_SIDE_RIGHT, true, false, NS_CORNER_BOTTOM_RIGHT_X);
|
|
|
|
CASE(NS_SIDE_RIGHT, true, true, NS_CORNER_BOTTOM_RIGHT_Y);
|
|
|
|
|
|
|
|
CASE(NS_SIDE_BOTTOM, false, true, NS_CORNER_BOTTOM_RIGHT_X);
|
|
|
|
CASE(NS_SIDE_BOTTOM, false, false, NS_CORNER_BOTTOM_RIGHT_Y);
|
|
|
|
CASE(NS_SIDE_BOTTOM, true, true, NS_CORNER_BOTTOM_LEFT_X);
|
|
|
|
CASE(NS_SIDE_BOTTOM, true, false, NS_CORNER_BOTTOM_LEFT_Y);
|
|
|
|
|
|
|
|
CASE(NS_SIDE_LEFT, false, false, NS_CORNER_BOTTOM_LEFT_X);
|
|
|
|
CASE(NS_SIDE_LEFT, false, true, NS_CORNER_BOTTOM_LEFT_Y);
|
|
|
|
CASE(NS_SIDE_LEFT, true, false, NS_CORNER_TOP_LEFT_X);
|
|
|
|
CASE(NS_SIDE_LEFT, true, true, NS_CORNER_TOP_LEFT_Y);
|
2008-09-30 22:50:52 -07:00
|
|
|
#undef CASE
|