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

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2D.h

Issue 141433026: Font metrics, version 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding Layout tests. Should work for simple text. Created 6 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011, 2012 Apple Inc. All rights reserv ed.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 realizeSavesLoop(); 304 realizeSavesLoop();
305 } 305 }
306 void realizeSavesLoop(); 306 void realizeSavesLoop();
307 307
308 void applyStrokePattern(); 308 void applyStrokePattern();
309 void applyFillPattern(); 309 void applyFillPattern();
310 310
311 void drawTextInternal(const String& text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false); 311 void drawTextInternal(const String& text, float x, float y, bool fill, float maxWidth = 0, bool useMaxWidth = false);
312 312
313 const Font& accessFont(); 313 const Font& accessFont();
314 int getFontBaseline(const FontMetrics&) const;
314 315
315 void clearCanvas(); 316 void clearCanvas();
316 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const; 317 bool rectContainsTransformedRect(const FloatRect&, const FloatRect&) const;
317 318
318 void inflateStrokeRect(FloatRect&) const; 319 void inflateStrokeRect(FloatRect&) const;
319 320
320 template<class T> void fullCanvasCompositedFill(const T&); 321 template<class T> void fullCanvasCompositedFill(const T&);
321 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c onst FloatRect&, CompositeOperator); 322 template<class T> void fullCanvasCompositedDrawImage(T*, const FloatRect&, c onst FloatRect&, CompositeOperator);
322 323
323 bool focusRingCallIsValid(const Path&, Element*); 324 bool focusRingCallIsValid(const Path&, Element*);
(...skipping 13 matching lines...) Expand all
337 bool m_usesCSSCompatibilityParseMode; 338 bool m_usesCSSCompatibilityParseMode;
338 bool m_hasAlpha; 339 bool m_hasAlpha;
339 MutableStylePropertyMap m_fetchedFonts; 340 MutableStylePropertyMap m_fetchedFonts;
340 }; 341 };
341 342
342 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d()); 343 DEFINE_TYPE_CASTS(CanvasRenderingContext2D, CanvasRenderingContext, context, con text->is2d(), context.is2d());
343 344
344 } // namespace WebCore 345 } // namespace WebCore
345 346
346 #endif 347 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698