Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
external_skia
Commits
e79c29fa
Commit
e79c29fa
authored
12 years ago
by
Jean-Baptiste Queru
Browse files
Options
Download
Email Patches
Plain Diff
Better tweaks for forward compatibility
Change-Id: I093e7a32dad529023f761b735eefbd1db6b1fca0
parent
fcdba6fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
include/core/SkPaint.h
include/core/SkPaint.h
+4
-0
include/core/SkPaintOptionsAndroid.h
include/core/SkPaintOptionsAndroid.h
+19
-0
include/core/SkTypeface.h
include/core/SkTypeface.h
+1
-0
include/ports/SkTypeface_android.h
include/ports/SkTypeface_android.h
+4
-0
No files found.
include/core/SkPaint.h
View file @
e79c29fa
...
...
@@ -16,6 +16,7 @@
#include "SkXfermode.h"
#ifdef SK_BUILD_FOR_ANDROID
#include "SkLanguage.h"
#include "SkPaintOptionsAndroid.h"
#endif
class
SkAnnotation
;
...
...
@@ -893,6 +894,9 @@ public:
/** Returns the base glyph count for the strike associated with this paint
*/
unsigned
getBaseGlyphCount
(
SkUnichar
text
)
const
;
SkPaintOptionsAndroid
&
getPaintOptionsAndroid
()
{
return
*
(
SkPaintOptionsAndroid
*
)
0
;
}
void
setPaintOptionsAndroid
(
const
SkPaintOptionsAndroid
&
options
)
{}
#endif
// returns true if the paint's settings (e.g. xfermode + alpha) resolve to
...
...
This diff is collapsed.
Click to expand it.
include/core/SkPaintOptionsAndroid.h
0 → 100644
View file @
e79c29fa
/*
* Copyright 2012 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkPaintOptionsAndroid_DEFINED
#define SkPaintOptionsAndroid_DEFINED
class
SkPaintOptionsAndroid
{
public:
void
setLanguage
(
const
SkLanguage
&
language
)
{}
void
setUseFontFallbacks
(
bool
useFontFallbacks
)
{}
enum
FontVariant
{
kElegant_Variant
};
};
#endif // #ifndef SkPaintOptionsAndroid_DEFINED
This diff is collapsed.
Click to expand it.
include/core/SkTypeface.h
View file @
e79c29fa
...
...
@@ -59,6 +59,7 @@ public:
/** Returns true if the typeface is fixed-width
*/
bool
isFixedWidth
()
const
{
return
fIsFixedWidth
;
}
bool
isFixedPitch
()
const
{
return
false
;
}
/** Return a 32bit value for this typeface, unique for the underlying font
data. Will never return 0.
...
...
This diff is collapsed.
Click to expand it.
include/ports/SkTypeface_android.h
View file @
e79c29fa
...
...
@@ -30,4 +30,8 @@ SK_API SkTypeface* SkCreateTypefaceForScriptNG(hb_script_t script, SkTypeface::S
SK_API
SkTypeface
*
SkCreateTypefaceForScript
(
HB_Script
script
,
SkTypeface
::
Style
style
,
SkPaint
::
FontVariant
fontVariant
=
SkPaint
::
kDefault_Variant
);
SK_API
SkTypeface
*
SkCreateTypefaceForScript
(
HB_Script
script
,
SkTypeface
::
Style
style
,
SkPaintOptionsAndroid
::
FontVariant
fontVariant
)
{
return
SkCreateTypefaceForScript
(
script
,
style
,
(
SkPaint
::
FontVariant
)
fontVariant
);
}
#endif
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment