Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: src/utils/SkMatrix22.h

Issue 213153006: Fix size of rotated text with FreeType. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | src/utils/SkMatrix22.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "SkPoint.h"
9
10 class SkMatrix;
11
12 /** Find the Givens matrix G, which is the rotational matrix
13 * that rotates the vector h to the positive hoizontal axis.
14 * G * h = [hypot(h), 0]
15 *
16 * This is equivalent to
17 *
18 * SkScalar r = h.length();
19 * SkScalar r_inv = r ? SkScalarInvert(r) : 0;
20 * h.scale(r_inv);
21 * G->setSinCos(-h.fY, h.fX);
22 *
23 * but has better numerical stability by using (partial) hypot,
24 * and saves a multiply by not computing r.
25 */
26 void SkComputeGivensRotation(const SkVector& h, SkMatrix* G);
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | src/utils/SkMatrix22.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698