PhTile_t *tile = PhGetTile(); tile->rect.ul.x = aX; tile->rect.ul.y = aY; tile->rect.lr.x = (aX+aWidth-1); tile->rect.lr.y = (aY+aHeight-1); if (tile->rect.lr.x == -1) {  tile->rect.lr.x = 0; tile->rect.lr.y = 0; } tile->next = NULL;  SetRegionEmpty(); mRegion = tile; }
if ( aWidth > 0 && aHeight > 0 ) {  PhTile_t *tile = PhGetTile( ); tile->rect.ul.x = aX; tile->rect.ul.y = aY; tile->rect.lr.x = (aX+aWidth-1); tile->rect.lr.y = (aY+aHeight-1); tile->next = NULL; mRegion = tile; } }
void nsRegionPh :: SetTo(PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight){  PR_LOG(PhGfxLog, PR_LOG_DEBUG, ("nsRegionPh::SetTo2 aX=<%d> aY=<%d> aWidth=<%d> aHeight=<%d>\n", aX, aY, aWidth, aHeight)); /* Create a temporary tile to  assign to mRegion */  PhTile_t *tile = PhGetTile();  tile->rect.ul.x = aX;  tile->rect.ul.y = aY;  tile->rect.lr.x = (aX+aWidth-1);  tile->rect.lr.y = (aY+aHeight-1);if (tile->rect.lr.x == -1){//  printf ("problem 1: %d %d %d %d\n",aX,aY,aWidth,aHeight);  tile->rect.lr.x = 0;  tile->rect.lr.y = 0;}  tile->next = NULL;    SetRegionEmpty();  mRegion = tile;}