Lines Matching refs:rp
60 struct RastPort *rp;
62 rp = XpmMalloc (sizeof (*rp));
63 if (rp != NULL)
65 InitRastPort (rp);
68 rp->BitMap = AllocBitMap (width, height, depth, BMF_CLEAR, NULL);
69 if (rp->BitMap == NULL)
71 FreeRastPort (rp, width, height);
79 rp->BitMap = XpmMalloc (sizeof (*rp->BitMap));
80 if (rp->BitMap == NULL)
82 FreeRastPort (rp, width, height);
86 InitBitMap (rp->BitMap, depth, width, height);
88 rp->BitMap->Planes[i] = NULL;
91 rp->BitMap->Planes[i] = (PLANEPTR)AllocRaster (width, height);
92 if (rp->BitMap->Planes[i] == NULL)
94 FreeRastPort (rp, width, height);
101 return rp;
107 struct RastPort *rp,
111 if (rp != NULL)
113 if (rp->BitMap != NULL)
117 FreeBitMap (rp->BitMap);
122 for (i = 0; i < rp->BitMap->Depth; ++i)
124 if (rp->BitMap->Planes[i] != NULL)
125 FreeRaster (rp->BitMap->Planes[i], width, height);
127 XpmFree (rp->BitMap);
130 XpmFree (rp);
148 img->rp = AllocRastPort (img->width, img->height, depth);
149 if (img->rp == NULL)
166 FreeRastPort (ximage->rp, ximage->width, ximage->height);
181 SetAPen (ximage->rp, pixel);
182 WritePixel (ximage->rp, x, y);