Lines Matching refs:transform

16 #include "ui/gfx/transform.h"
25 const gfx::Transform& transform,
32 if (!transform.matrix().get(2, 2))
35 SkMScalar z = -(transform.matrix().get(2, 0) * p.x() +
36 transform.matrix().get(2, 1) * p.y() +
37 transform.matrix().get(2, 3)) /
38 transform.matrix().get(2, 2);
40 transform.matrix().mapMScalars(result.vec, result.vec);
45 const gfx::Transform& transform,
48 transform.matrix().mapMScalars(result.vec, result.vec);
104 gfx::Rect MathUtil::MapClippedRect(const gfx::Transform& transform,
106 return gfx::ToEnclosingRect(MapClippedRect(transform, gfx::RectF(src_rect)));
109 gfx::RectF MathUtil::MapClippedRect(const gfx::Transform& transform,
111 if (transform.IsIdentityOrTranslation())
114 static_cast<float>(transform.matrix().getDouble(0, 3)),
115 static_cast<float>(transform.matrix().getDouble(1, 3)));
117 // Apply the transform, but retain the result in homogeneous coordinates.
130 transform.matrix().map2(quad, 4, result);
139 gfx::RectF MathUtil::ProjectClippedRect(const gfx::Transform& transform,
141 if (transform.IsIdentityOrTranslation()) {
144 static_cast<float>(transform.matrix().getDouble(0, 3)),
145 static_cast<float>(transform.matrix().getDouble(1, 3)));
150 HomogeneousCoordinate h1 = ProjectHomogeneousPoint(transform, q.p1());
151 HomogeneousCoordinate h2 = ProjectHomogeneousPoint(transform, q.p2());
152 HomogeneousCoordinate h3 = ProjectHomogeneousPoint(transform, q.p3());
153 HomogeneousCoordinate h4 = ProjectHomogeneousPoint(transform, q.p4());
158 void MathUtil::MapClippedQuad(const gfx::Transform& transform,
163 MapHomogeneousPoint(transform, gfx::Point3F(src_quad.p1()));
165 MapHomogeneousPoint(transform, gfx::Point3F(src_quad.p2()));
167 MapHomogeneousPoint(transform, gfx::Point3F(src_quad.p3()));
169 MapHomogeneousPoint(transform, gfx::Point3F(src_quad.p4()));
327 gfx::QuadF MathUtil::MapQuad(const gfx::Transform& transform,
330 if (transform.IsIdentityOrTranslation()) {
333 gfx::Vector2dF(static_cast<float>(transform.matrix().getDouble(0, 3)),
334 static_cast<float>(transform.matrix().getDouble(1, 3)));
340 MapHomogeneousPoint(transform, gfx::Point3F(q.p1()));
342 MapHomogeneousPoint(transform, gfx::Point3F(q.p2()));
344 MapHomogeneousPoint(transform, gfx::Point3F(q.p3()));
346 MapHomogeneousPoint(transform, gfx::Point3F(q.p4()));
359 gfx::PointF MathUtil::MapPoint(const gfx::Transform& transform,
362 HomogeneousCoordinate h = MapHomogeneousPoint(transform, gfx::Point3F(p));
383 gfx::Point3F MathUtil::MapPoint(const gfx::Transform& transform,
386 HomogeneousCoordinate h = MapHomogeneousPoint(transform, p);
407 gfx::QuadF MathUtil::ProjectQuad(const gfx::Transform& transform,
412 projected_quad.set_p1(ProjectPoint(transform, q.p1(), &clipped_point));
414 projected_quad.set_p2(ProjectPoint(transform, q.p2(), &clipped_point));
416 projected_quad.set_p3(ProjectPoint(transform, q.p3(), &clipped_point));
418 projected_quad.set_p4(ProjectPoint(transform, q.p4(), &clipped_point));
424 gfx::PointF MathUtil::ProjectPoint(const gfx::Transform& transform,
427 HomogeneousCoordinate h = ProjectHomogeneousPoint(transform, p);
454 const gfx::Transform& transform,
456 if (transform.HasPerspective())
458 float x_scale = ScaleOnAxis(transform.matrix().getDouble(0, 0),
459 transform.matrix().getDouble(1, 0),
460 transform.matrix().getDouble(2, 0));
461 float y_scale = ScaleOnAxis(transform.matrix().getDouble(0, 1),
462 transform.matrix().getDouble(1, 1),
463 transform.matrix().getDouble(2, 1));
556 scoped_ptr<base::Value> MathUtil::AsValue(const gfx::Transform& transform) {
558 const SkMatrix44& m = transform.matrix();