(*aColors)[aInvert ? (*aStops - 1 - i) : i].SetValue(Color::MakeARGB(BYTE(255*opacity), NS_GET_R(rgba), NS_GET_G(rgba), NS_GET_B(rgba))); (*aPositions)[i] = (REAL)offset;
(*aColors)[idx].SetValue(argb); (*aPositions)[idx] = (REAL)offset; idx++;  if (i == num-1 && offset != 1.0) { (*aColors)[idx].SetValue(argb); (*aPositions)[idx] = (REAL)1.0f; } }  if (aInvert) { for (PRUint32 i=0; i < *aStops / 2; i++) { Color tmpColor; REAL tmpOffset;  tmpColor = (*aColors)[i]; (*aColors)[i] = (*aColors)[*aStops - 1 - i]; (*aColors)[*aStops - 1 - i] = tmpColor;  tmpOffset = (*aPositions)[i]; (*aPositions)[i] = 1.0f - (*aPositions)[*aStops - 1 - i]; (*aPositions)[*aStops - 1 - i] = 1.0f - tmpOffset; }
GDIPlusGetStops(nsISVGGradient *aGrad, Color **aColors, REAL **aPositions,                PRUint32 *aStops, PRBool aInvert){  aGrad->GetStopCount(aStops);  *aColors = new Color[*aStops];  *aPositions = new REAL[*aStops];  for (PRUint32 i = 0; i < *aStops; i++) {    nscolor rgba;    float offset;    float opacity;    aGrad->GetStopOffset(i, &offset);    aGrad->GetStopColor(i, &rgba);    aGrad->GetStopOpacity(i, &opacity);#ifdef DEBUG_tor    fprintf(stderr, "stop %f %08X opacity %f\n", offset, rgba, opacity);#endif    (*aColors)[aInvert ? (*aStops - 1 - i) : i].SetValue(Color::MakeARGB(BYTE(255*opacity),									 NS_GET_R(rgba),									 NS_GET_G(rgba),									 NS_GET_B(rgba)));    (*aPositions)[i] = (REAL)offset;  }}