This commit is contained in:
bryner%netscape.com 2001-08-17 09:56:46 +00:00
Родитель dd46629d2f
Коммит 87757476ec
2 изменённых файлов: 9 добавлений и 9 удалений

Просмотреть файл

@ -105,7 +105,7 @@ nsPolygonFrame::Init(nsIPresContext* aPresContext,
nsAutoString type;
mContent->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, type);
mContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, type);
if (type.EqualsIgnoreCase(NS_ConvertASCIItoUCS2("swatch")) || type.IsEmpty())
{
@ -155,14 +155,14 @@ nsPolygonFrame::Reflow(nsIPresContext* aPresContext,
}
nsAutoString coordStr;
nsresult res = mContent->GetAttribute(kNameSpaceID_None, nsSVGAtoms::x, coordStr);
nsresult res = mContent->GetAttr(kNameSpaceID_None, nsSVGAtoms::x, coordStr);
if (NS_SUCCEEDED(res)) {
char * s = coordStr.ToNewCString();
mX = NSIntPixelsToTwips(atoi(s), p2t*scale);
delete [] s;
}
res = mContent->GetAttribute(kNameSpaceID_None, nsSVGAtoms::y, coordStr);
res = mContent->GetAttr(kNameSpaceID_None, nsSVGAtoms::y, coordStr);
if (NS_SUCCEEDED(res)) {
char * s = coordStr.ToNewCString();
mY = NSIntPixelsToTwips(atoi(s), p2t*scale);
@ -235,7 +235,7 @@ nsPolygonFrame::GetPoints()
}
nsAutoString pointsStr;
nsresult res = mContent->GetAttribute(kNameSpaceID_None, nsSVGAtoms::points, pointsStr);
nsresult res = mContent->GetAttr(kNameSpaceID_None, nsSVGAtoms::points, pointsStr);
char * ps = pointsStr.ToNewCString();
char seps[] = " ";
@ -316,7 +316,7 @@ NS_METHOD nsPolygonFrame::RenderPoints(nsIRenderingContext& aRenderingContext,
const nsPoint aPoints[], PRInt32 aNumPoints)
{
//nsAutoString fillStr;
//nsresult res = mContent->GetAttribute(kNameSpaceID_None, nsSVGAtoms::fill, fillStr);
//nsresult res = mContent->GetAttr(kNameSpaceID_None, nsSVGAtoms::fill, fillStr);
//if (NS_SUCCEEDED(res)) {
aRenderingContext.FillPolygon(aPoints, aNumPoints);
//} else {

Просмотреть файл

@ -93,7 +93,7 @@ nsSVGPathFrame::Init(nsIPresContext* aPresContext,
nsAutoString type;
mContent->GetAttribute(kNameSpaceID_None, nsHTMLAtoms::type, type);
mContent->GetAttr(kNameSpaceID_None, nsHTMLAtoms::type, type);
if (type.EqualsIgnoreCase(NS_ConvertASCIItoUCS2("swatch")) || type.IsEmpty())
{
@ -143,14 +143,14 @@ nsSVGPathFrame::Reflow(nsIPresContext* aPresContext,
}
nsAutoString coordStr;
nsresult res = mContent->GetAttribute(kNameSpaceID_None, nsSVGAtoms::x, coordStr);
nsresult res = mContent->GetAttr(kNameSpaceID_None, nsSVGAtoms::x, coordStr);
if (NS_SUCCEEDED(res)) {
char * s = coordStr.ToNewCString();
mX = NSIntPixelsToTwips(atoi(s), p2t*scale);
delete [] s;
}
res = mContent->GetAttribute(kNameSpaceID_None, nsSVGAtoms::y, coordStr);
res = mContent->GetAttr(kNameSpaceID_None, nsSVGAtoms::y, coordStr);
if (NS_SUCCEEDED(res)) {
char * s = coordStr.ToNewCString();
mY = NSIntPixelsToTwips(atoi(s), p2t*scale);
@ -158,7 +158,7 @@ nsSVGPathFrame::Reflow(nsIPresContext* aPresContext,
}
nsAutoString pathStr;
res = mContent->GetAttribute(kNameSpaceID_None, nsSVGAtoms::d, pathStr);
res = mContent->GetAttr(kNameSpaceID_None, nsSVGAtoms::d, pathStr);
if (NS_SUCCEEDED(res)) {
char * s = pathStr.ToNewCString();
// parse path commands here