static void zoom_frame(struct weston_surface_animation *animation) { struct weston_surface *es = animation->surface; float scale; scale = animation->start + (animation->stop - animation->start) * animation->spring.current; weston_matrix_init(&animation->transform.matrix); weston_matrix_translate(&animation->transform.matrix, -0.5f * es->geometry.width, -0.5f * es->geometry.height, 0); weston_matrix_scale(&animation->transform.matrix, scale, scale, scale); weston_matrix_translate(&animation->transform.matrix, 0.5f * es->geometry.width, 0.5f * es->geometry.height, 0); es->alpha = animation->spring.current; if (es->alpha > 1.0) es->alpha = 1.0; }
void Transform::scale(float x, float y, float z) { weston_matrix_scale(&m_transform.matrix, x, y, z); }