Lines Matching defs:zoomed
44 * \param x0, x1 returned X bounds of zoomed region [x0, x1)
45 * \param y0, y1 returned Y bounds of zoomed region [y0, y1)
46 * \return GL_TRUE if any zoomed pixels visible, GL_FALSE if totally clipped
103 * Convert a zoomed x image coordinate back to an unzoomed x coord.
104 * 'zx' is screen position of a pixel in the zoomed image, who's left edge
135 SWspan zoomed;
159 INIT_SPAN(zoomed, GL_BITMAP);
160 zoomed.x = x0;
161 zoomed.end = zoomedWidth;
162 zoomed.array = swrast->ZoomedArrays;
163 zoomed.array->ChanType = span->array->ChanType;
164 if (zoomed.array->ChanType == GL_UNSIGNED_BYTE)
165 zoomed.array->rgba = (GLchan (*)[4]) zoomed.array->rgba8;
166 else if (zoomed.array->ChanType == GL_UNSIGNED_SHORT)
167 zoomed.array->rgba = (GLchan (*)[4]) zoomed.array->rgba16;
169 zoomed.array->rgba = (GLchan (*)[4]) zoomed.array->attribs[FRAG_ATTRIB_COL0];
171 COPY_4V(zoomed.attrStart[FRAG_ATTRIB_WPOS], span->attrStart[FRAG_ATTRIB_WPOS]);
172 COPY_4V(zoomed.attrStepX[FRAG_ATTRIB_WPOS], span->attrStepX[FRAG_ATTRIB_WPOS]);
173 COPY_4V(zoomed.attrStepY[FRAG_ATTRIB_WPOS], span->attrStepY[FRAG_ATTRIB_WPOS]);
175 zoomed.attrStart[FRAG_ATTRIB_FOGC][0] = span->attrStart[FRAG_ATTRIB_FOGC][0];
176 zoomed.attrStepX[FRAG_ATTRIB_FOGC][0] = span->attrStepX[FRAG_ATTRIB_FOGC][0];
177 zoomed.attrStepY[FRAG_ATTRIB_FOGC][0] = span->attrStepY[FRAG_ATTRIB_FOGC][0];
181 zoomed.z = span->z;
182 zoomed.zStep = span->zStep;
184 zoomed.interpMask = span->interpMask & ~SPAN_RGBA;
185 zoomed.arrayMask |= SPAN_RGBA;
186 zoomed.arrayAttribs |= FRAG_BIT_COL0; /* we'll produce these values */
191 zoomed.red = span->red;
192 zoomed.green = span->green;
193 zoomed.blue = span->blue;
194 zoomed.alpha = span->alpha;
195 zoomed.redStep = span->redStep;
196 zoomed.greenStep = span->greenStep;
197 zoomed.blueStep = span->blueStep;
198 zoomed.alphaStep = span->alphaStep;
200 zoomed.interpMask = span->interpMask & ~SPAN_Z;
201 zoomed.arrayMask |= SPAN_Z;
211 if (zoomed.array->ChanType == GL_UNSIGNED_BYTE) {
218 COPY_4UBV(zoomed.array->rgba8[i], rgba[j]);
221 else if (zoomed.array->ChanType == GL_UNSIGNED_SHORT) {
228 COPY_4V(zoomed.array->rgba16[i], rgba[j]);
238 COPY_4V(zoomed.array->attribs[FRAG_ATTRIB_COL0][i], rgba[j]);
243 if (zoomed.array->ChanType == GL_UNSIGNED_BYTE) {
250 zoomed.array->rgba8[i][0] = rgb[j][0];
251 zoomed.array->rgba8[i][1] = rgb[j][1];
252 zoomed.array->rgba8[i][2] = rgb[j][2];
253 zoomed.array->rgba8[i][3] = 0xff;
256 else if (zoomed.array->ChanType == GL_UNSIGNED_SHORT) {
263 zoomed.array->rgba16[i][0] = rgb[j][0];
264 zoomed.array->rgba16[i][1] = rgb[j][1];
265 zoomed.array->rgba16[i][2] = rgb[j][2];
266 zoomed.array->rgba16[i][3] = 0xffff;
276 zoomed.array->attribs[FRAG_ATTRIB_COL0][i][0] = rgb[j][0];
277 zoomed.array->attribs[FRAG_ATTRIB_COL0][i][1] = rgb[j][1];
278 zoomed.array->attribs[FRAG_ATTRIB_COL0][i][2] = rgb[j][2];
279 zoomed.array->attribs[FRAG_ATTRIB_COL0][i][3] = 1.0F;
290 zoomed.array->z[i] = zValues[j];
302 const GLint end = zoomed.end; /* save */
305 (zoomed.array->ChanType == GL_UNSIGNED_BYTE) ? 4 * sizeof(GLubyte) :
306 ((zoomed.array->ChanType == GL_UNSIGNED_SHORT) ? 4 * sizeof(GLushort)
309 rgbaSave = malloc(zoomed.end * pixelSize);
315 memcpy(rgbaSave, zoomed.array->rgba, zoomed.end * pixelSize);
317 for (zoomed.y = y0; zoomed.y < y1; zoomed.y++) {
318 _swrast_write_rgba_span(ctx, &zoomed);
319 zoomed.end = end; /* restore */
322 memcpy(zoomed.array->rgba, rgbaSave, zoomed.end * pixelSize);
390 /* write the zoomed spans */
435 /* write the zoomed spans */