Home | History | Annotate | Download | only in skin

Lines Matching full:scaler

12 #include "android/skin/scaler.h"
35 /* change the scale of a given scaler. returns 0 on success, or -1 in case of
38 skin_scaler_set( SkinScaler* scaler, double scale, double xdisp, double ydisp )
46 scaler->scale = scale;
47 scaler->xdisp = xdisp;
48 scaler->ydisp = ydisp;
49 scaler->invscale = 1/scale;
50 scaler->valid = 1;
56 skin_scaler_free( SkinScaler* scaler )
58 scaler=scaler;
84 skin_scaler_get_scaled_rect( SkinScaler* scaler,
92 double scale = scaler->scale;
94 if (!scaler->valid) {
99 drect->pos.x = (int)(sx * scale + scaler->xdisp);
100 drect->pos.y = (int)(sy * scale + scaler->ydisp);
101 drect->size.w = (int)(ceil((sx + sw) * scale + scaler->xdisp)) - drect->pos.x;
102 drect->size.h = (int)(ceil((sy + sh) * scale + scaler->ydisp)) - drect->pos.y;
106 skin_scaler_scale( SkinScaler* scaler,
116 if ( !scaler->valid )
122 op.scale = scaler->scale;
131 op.rd.x = (int)(sx * scaler->scale + scaler->xdisp);
132 op.rd.y = (int)(sy * scaler->scale + scaler->ydisp);
133 op.rd.w = (int)(ceil((sx + sw) * scaler->scale + scaler->xdisp)) - op.rd.x;
134 op.rd.h = (int)(ceil((sy + sh) * scaler->scale + scaler->ydisp)) - op.rd.y;
138 op.sx = (int)((op.rd.x - scaler->xdisp) * scaler->invscale * 65536);
139 op.sy = (int)((op.rd.y - scaler->ydisp) * scaler->invscale * 65536);
141 op.ix = (int)( scaler->invscale * 65536 );