[paint-extents] Const-correctness

This commit is contained in:
Behdad Esfahbod 2022-12-31 10:53:40 -07:00
parent f6dc4698ef
commit 4e94b65cff
1 changed files with 4 additions and 4 deletions

View File

@ -102,7 +102,7 @@ typedef struct hb_transform_t
*this = r; *this = r;
} }
void transform_distance (float &dx, float &dy) void transform_distance (float &dx, float &dy) const
{ {
float new_x = xx * dx + xy * dy; float new_x = xx * dx + xy * dy;
float new_y = yx * dx + yy * dy; float new_y = yx * dx + yy * dy;
@ -110,14 +110,14 @@ typedef struct hb_transform_t
dy = new_y; dy = new_y;
} }
void transform_point (float &x, float &y) void transform_point (float &x, float &y) const
{ {
transform_distance (x, y); transform_distance (x, y);
x += x0; x += x0;
y += y0; y += y0;
} }
void transform_extents (hb_extents_t extents) void transform_extents (hb_extents_t extents) const
{ {
float quad_x[4], quad_y[4]; float quad_x[4], quad_y[4];
@ -235,7 +235,7 @@ struct hb_paint_extents_context_t {
void push_clip (hb_extents_t extents) void push_clip (hb_extents_t extents)
{ {
/* Transform extents and push a new clip. */ /* Transform extents and push a new clip. */
hb_transform_t &t = transforms.tail (); const hb_transform_t &t = transforms.tail ();
t.transform_extents (extents); t.transform_extents (extents);
clips.push (hb_bounds_t {extents}); clips.push (hb_bounds_t {extents});