[paint-extents] Simplify transform_extents
This commit is contained in:
parent
e062f98260
commit
a63d329261
|
@ -130,18 +130,11 @@ typedef struct hb_transform_t
|
|||
quad_x[3] = extents.xmax;
|
||||
quad_y[3] = extents.ymax;
|
||||
|
||||
extents = hb_extents_t {};
|
||||
for (unsigned i = 0; i < 4; i++)
|
||||
transform_point (quad_x[i], quad_y[i]);
|
||||
|
||||
extents.xmin = extents.xmax = quad_x[0];
|
||||
extents.ymin = extents.ymax = quad_y[0];
|
||||
|
||||
for (unsigned i = 1; i < 4; i++)
|
||||
{
|
||||
extents.xmin = hb_min (extents.xmin, quad_x[i]);
|
||||
extents.ymin = hb_min (extents.ymin, quad_y[i]);
|
||||
extents.xmax = hb_max (extents.xmax, quad_x[i]);
|
||||
extents.ymax = hb_max (extents.ymax, quad_y[i]);
|
||||
transform_point (quad_x[i], quad_y[i]);
|
||||
extents.add_point (quad_x[i], quad_y[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue