Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6d90a0a
)
samples/3D/HiraganaCube: Fixes reflecting extent fixes and outline
author
Jerome St-Louis
<jerome@ecere.com>
Wed, 3 Aug 2016 04:27:57 +0000
(
00:27
-0400)
committer
Jerome St-Louis
<jerome@ecere.com>
Wed, 3 Aug 2016 04:27:57 +0000
(
00:27
-0400)
samples/3D/HiraganaCube/hiraganaCube.ec
patch
|
blob
|
history
diff --git
a/samples/3D/HiraganaCube/hiraganaCube.ec
b/samples/3D/HiraganaCube/hiraganaCube.ec
index
9f8d2d3
..
957b6a7
100644
(file)
--- a/
samples/3D/HiraganaCube/hiraganaCube.ec
+++ b/
samples/3D/HiraganaCube/hiraganaCube.ec
@@
-108,7
+108,8
@@
class Test3D : Window
lfbSystem.Create("LFB", null, false);
//font = lfbSystem.LoadFont("Arial Unicode MS", 180, 0);
//font = lfbSystem.LoadFont("MingLiu", 150, 0);
lfbSystem.Create("LFB", null, false);
//font = lfbSystem.LoadFont("Arial Unicode MS", 180, 0);
//font = lfbSystem.LoadFont("MingLiu", 150, 0);
- font = lfbSystem.LoadFont("FreeSans.ttf", 175, 0);
+ //font = lfbSystem.LoadFont("FreeSans.ttf", 175, 0);
+ font = lfbSystem.LoadOutlineFont("FreeSans.ttf", 160, 0, 10.0, 0.2);
for(group = cube.mesh.groups.first, c = 0; c<6; c++, group = group.next)
{
for(group = cube.mesh.groups.first, c = 0; c<6; c++, group = group.next)
{
@@
-123,8
+124,8
@@
class Test3D : Window
surface.Clear(colorBuffer);
surface.SetForeground(ColorAlpha { 255/*128*/, ColorHSV { 60 * c, 100, 50 }});
surface.TextExtent(hiragana[c], strlen(hiragana[c]), &tw, &th);
surface.Clear(colorBuffer);
surface.SetForeground(ColorAlpha { 255/*128*/, ColorHSV { 60 * c, 100, 50 }});
surface.TextExtent(hiragana[c], strlen(hiragana[c]), &tw, &th);
-
//surface.WriteText((256 - tw) / 2, (256 - th) / 2 /*+ 20*/, hiragana[c], strlen(hiragana[c]))
;
- surface.WriteText(
12,-45
, hiragana[c], strlen(hiragana[c]));
+
surface.outlineColor = black
;
+ surface.WriteText(
(256 - tw) / 2, (256 - th) / 2
, hiragana[c], strlen(hiragana[c]));
surface.SetBackground({ 255 /*64*/, ColorHSV { (90 + 60 * c) % 360, 75, 50 }} );
surface.Area(5,5, 250,20);
surface.Area(5,5, 20,250);
surface.SetBackground({ 255 /*64*/, ColorHSV { (90 + 60 * c) % 360, 75, 50 }} );
surface.Area(5,5, 250,20);
surface.Area(5,5, 20,250);