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

Side by Side Diff: src/ports/SkFontHost_win.cpp

Issue 864713002: remove dead SkPersp macros (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « src/core/SkScalerContext.cpp ('k') | tests/MatrixTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkAdvancedTypefaceMetrics.h" 9 #include "SkAdvancedTypefaceMetrics.h"
10 #include "SkBase64.h" 10 #include "SkBase64.h"
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 glyph->fAdvanceX = SkIntToFixed(glyph->fWidth); 847 glyph->fAdvanceX = SkIntToFixed(glyph->fWidth);
848 glyph->fAdvanceY = 0; 848 glyph->fAdvanceY = 0;
849 849
850 // Vector FON will transform nicely, but bitmap FON do not. 850 // Vector FON will transform nicely, but bitmap FON do not.
851 if (fType == SkScalerContext_GDI::kLine_Type) { 851 if (fType == SkScalerContext_GDI::kLine_Type) {
852 SkRect bounds = SkRect::MakeXYWH(glyph->fLeft, glyph->fTop, 852 SkRect bounds = SkRect::MakeXYWH(glyph->fLeft, glyph->fTop,
853 glyph->fWidth, glyph->fHeight); 853 glyph->fWidth, glyph->fHeight);
854 SkMatrix m; 854 SkMatrix m;
855 m.setAll(SkFIXEDToScalar(fMat22.eM11), -SkFIXEDToScalar(fMat22.eM21) , 0, 855 m.setAll(SkFIXEDToScalar(fMat22.eM11), -SkFIXEDToScalar(fMat22.eM21) , 0,
856 -SkFIXEDToScalar(fMat22.eM12), SkFIXEDToScalar(fMat22.eM22) , 0, 856 -SkFIXEDToScalar(fMat22.eM12), SkFIXEDToScalar(fMat22.eM22) , 0,
857 0, 0, SkScalarToPersp(SK_Scalar1)); 857 0, 0, 1);
858 m.mapRect(&bounds); 858 m.mapRect(&bounds);
859 bounds.roundOut(&bounds); 859 bounds.roundOut(&bounds);
860 glyph->fLeft = SkScalarTruncToInt(bounds.fLeft); 860 glyph->fLeft = SkScalarTruncToInt(bounds.fLeft);
861 glyph->fTop = SkScalarTruncToInt(bounds.fTop); 861 glyph->fTop = SkScalarTruncToInt(bounds.fTop);
862 glyph->fWidth = SkScalarTruncToInt(bounds.width()); 862 glyph->fWidth = SkScalarTruncToInt(bounds.width());
863 glyph->fHeight = SkScalarTruncToInt(bounds.height()); 863 glyph->fHeight = SkScalarTruncToInt(bounds.height());
864 } 864 }
865 865
866 // Apply matrix to advance. 866 // Apply matrix to advance.
867 glyph->fAdvanceY = SkFixedMul(-SkFIXEDToFixed(fMat22.eM12), glyph->fAdva nceX); 867 glyph->fAdvanceY = SkFixedMul(-SkFIXEDToFixed(fMat22.eM12), glyph->fAdva nceX);
(...skipping 1645 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 2513
2514 private: 2514 private:
2515 SkTDArray<ENUMLOGFONTEX> fLogFontArray; 2515 SkTDArray<ENUMLOGFONTEX> fLogFontArray;
2516 }; 2516 };
2517 2517
2518 /////////////////////////////////////////////////////////////////////////////// 2518 ///////////////////////////////////////////////////////////////////////////////
2519 2519
2520 SkFontMgr* SkFontMgr_New_GDI() { 2520 SkFontMgr* SkFontMgr_New_GDI() {
2521 return SkNEW(SkFontMgrGDI); 2521 return SkNEW(SkFontMgrGDI);
2522 } 2522 }
OLDNEW
« no previous file with comments | « src/core/SkScalerContext.cpp ('k') | tests/MatrixTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698