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

Side by Side Diff: app/gfx/canvas.h

Issue 384018: Added a flag to the Canvas class which allows forcing an RTL directionality... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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 | « no previous file | app/gfx/canvas_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef APP_GFX_CANVAS_H_ 5 #ifndef APP_GFX_CANVAS_H_
6 #define APP_GFX_CANVAS_H_ 6 #define APP_GFX_CANVAS_H_
7 7
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // underline (SHOW_PREFIX), or not rendered at all (HIDE_PREFIX). 59 // underline (SHOW_PREFIX), or not rendered at all (HIDE_PREFIX).
60 SHOW_PREFIX = 128, 60 SHOW_PREFIX = 128,
61 HIDE_PREFIX = 256, 61 HIDE_PREFIX = 256,
62 62
63 // Prevent ellipsizing 63 // Prevent ellipsizing
64 NO_ELLIPSIS = 512, 64 NO_ELLIPSIS = 512,
65 65
66 // Specifies if words can be split by new lines. 66 // Specifies if words can be split by new lines.
67 // This only works with MULTI_LINE. 67 // This only works with MULTI_LINE.
68 CHARACTER_BREAK = 1024, 68 CHARACTER_BREAK = 1024,
69
70 // Instructs DrawStringInt() to render the text using RTL directionality.
71 // In most cases, passing this flag is not necessary because information
72 // about the text directionality is going to be embedded within the string
73 // in the form of special Unicode characters. However, we don't insert
74 // directionality characters into strings if the locale is LTR because some
75 // platforms (for example, an English Windows XP with no RTL fonts
76 // installed) don't support these characters. Thus, this flag should be
77 // used to render text using RTL directionality when the locale is LTR.
78 FORCE_RTL_DIRECTIONALITY = 2048,
69 }; 79 };
70 80
71 // Creates an empty Canvas. Callers must use initialize before using the 81 // Creates an empty Canvas. Callers must use initialize before using the
72 // canvas. 82 // canvas.
73 Canvas(); 83 Canvas();
74 84
75 Canvas(int width, int height, bool is_opaque); 85 Canvas(int width, int height, bool is_opaque);
76 86
77 virtual ~Canvas(); 87 virtual ~Canvas();
78 88
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 const SkColor& color, int x, int y, int w, int h, 218 const SkColor& color, int x, int y, int w, int h,
209 int flags); 219 int flags);
210 #endif 220 #endif
211 221
212 DISALLOW_COPY_AND_ASSIGN(Canvas); 222 DISALLOW_COPY_AND_ASSIGN(Canvas);
213 }; 223 };
214 224
215 } // namespace gfx; 225 } // namespace gfx;
216 226
217 #endif // APP_GFX_CANVAS_H_ 227 #endif // APP_GFX_CANVAS_H_
OLDNEW
« no previous file with comments | « no previous file | app/gfx/canvas_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698