Thickness of side is now checked. Fixed bug 14944. r=rods

This commit is contained in:
dcone@netscape.com
1999-11-18 16:03:45 +00:00
parent cab84ed139
commit 28f34c3c9b
2 changed files with 36 additions and 4 deletions

View File

@@ -2487,14 +2487,30 @@ nscolor sideColor;
nsPoint polypath[MAXPOLYPATHSIZE];
PRInt32 curIndex,c1Index,c2Index,junk;
PRInt8 border_Style;
PRInt16 r,g,b;
PRInt16 r,g,b,thickness;
// set the style information
aBorderStyle.GetBorderColor(aSide,sideColor);
aRenderingContext.SetColor ( sideColor );
thickness = 0;
switch(aSide){
case NS_SIDE_LEFT:
thickness = aBorThick.left;
break;
case NS_SIDE_TOP:
thickness = aBorThick.top;
break;
case NS_SIDE_RIGHT:
thickness = aBorThick.right;
break;
case NS_SIDE_BOTTOM:
thickness = aBorThick.bottom;
break;
}
// if the border is thin, just draw it
if (aBorThick.top<aTwipsPerPixel) {
if (thickness<aTwipsPerPixel) {
// NOTHING FANCY JUST DRAW OUR OUTSIDE BORDER
thecurve.SetPoints(aPoints[0].x,aPoints[0].y,aPoints[1].x,aPoints[1].y,aPoints[2].x,aPoints[2].y);
thecurve.SubDivide((nsIRenderingContext*)&aRenderingContext,0,0);

View File

@@ -2487,14 +2487,30 @@ nscolor sideColor;
nsPoint polypath[MAXPOLYPATHSIZE];
PRInt32 curIndex,c1Index,c2Index,junk;
PRInt8 border_Style;
PRInt16 r,g,b;
PRInt16 r,g,b,thickness;
// set the style information
aBorderStyle.GetBorderColor(aSide,sideColor);
aRenderingContext.SetColor ( sideColor );
thickness = 0;
switch(aSide){
case NS_SIDE_LEFT:
thickness = aBorThick.left;
break;
case NS_SIDE_TOP:
thickness = aBorThick.top;
break;
case NS_SIDE_RIGHT:
thickness = aBorThick.right;
break;
case NS_SIDE_BOTTOM:
thickness = aBorThick.bottom;
break;
}
// if the border is thin, just draw it
if (aBorThick.top<aTwipsPerPixel) {
if (thickness<aTwipsPerPixel) {
// NOTHING FANCY JUST DRAW OUR OUTSIDE BORDER
thecurve.SetPoints(aPoints[0].x,aPoints[0].y,aPoints[1].x,aPoints[1].y,aPoints[2].x,aPoints[2].y);
thecurve.SubDivide((nsIRenderingContext*)&aRenderingContext,0,0);