Skip to content

Commit be4ae5e

Browse files
project dump
0 parents  commit be4ae5e

20 files changed

+1502
-0
lines changed

.LedMatrix.vsarduino.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#define __AVR_ATmega328P__
2+
#define __cplusplus
3+
#define __builtin_va_list int
4+
#define __attribute__(x)
5+
#define __inline__
6+
#define __asm__(x)
7+
#define ARDUINO 100
8+
extern "C" void __cxa_pure_virtual() {}
9+
void setup();
10+
void loop();
11+
12+
#include "C:\Arduino-1.0\hardware\arduino\variants\standard\pins_arduino.h"
13+
#include "C:\Arduino-1.0\hardware\arduino\cores\arduino\Arduino.h"
14+
#include "E:\Workspace\Arduino\Repository\Waldo\LedMatrix\LedMatrix.pde"

.gitattributes

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
*.sln merge=union
7+
*.csproj merge=union
8+
*.vbproj merge=union
9+
*.fsproj merge=union
10+
*.dbproj merge=union
11+
12+
# Standard to msysgit
13+
*.doc diff=astextplain
14+
*.DOC diff=astextplain
15+
*.docx diff=astextplain
16+
*.DOCX diff=astextplain
17+
*.dot diff=astextplain
18+
*.DOT diff=astextplain
19+
*.pdf diff=astextplain
20+
*.PDF diff=astextplain
21+
*.rtf diff=astextplain
22+
*.RTF diff=astextplain

.gitignore

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
.vmprogram
2+
3+
#################
4+
## Eclipse
5+
#################
6+
7+
*.pydevproject
8+
.project
9+
.metadata
10+
bin/
11+
tmp/
12+
*.tmp
13+
*.bak
14+
*.swp
15+
*~.nib
16+
local.properties
17+
.classpath
18+
.settings/
19+
.loadpath
20+
21+
# External tool builders
22+
.externalToolBuilders/
23+
24+
# Locally stored "Eclipse launch configurations"
25+
*.launch
26+
27+
# CDT-specific
28+
.cproject
29+
30+
# PDT-specific
31+
.buildpath
32+
33+
34+
#################
35+
## Visual Studio
36+
#################
37+
38+
## Ignore Visual Studio temporary files, build results, and
39+
## files generated by popular Visual Studio add-ons.
40+
41+
# User-specific files
42+
*.suo
43+
*.user
44+
*.sln.docstates
45+
46+
# Build results
47+
48+
[Dd]ebug/
49+
[Rr]elease/
50+
x64/
51+
build/
52+
[Bb]in/
53+
[Oo]bj/
54+
55+
# MSTest test Results
56+
[Tt]est[Rr]esult*/
57+
[Bb]uild[Ll]og.*
58+
59+
*_i.c
60+
*_p.c
61+
*.ilk
62+
*.meta
63+
*.obj
64+
*.pch
65+
*.pdb
66+
*.pgc
67+
*.pgd
68+
*.rsp
69+
*.sbr
70+
*.tlb
71+
*.tli
72+
*.tlh
73+
*.tmp
74+
*.tmp_proj
75+
*.log
76+
*.vspscc
77+
*.vssscc
78+
.builds
79+
*.pidb
80+
*.log
81+
*.scc
82+
83+
# Visual C++ cache files
84+
ipch/
85+
*.aps
86+
*.ncb
87+
*.opensdf
88+
*.sdf
89+
*.cachefile
90+
91+
# Visual Studio profiler
92+
*.psess
93+
*.vsp
94+
*.vspx
95+
96+
# Guidance Automation Toolkit
97+
*.gpState
98+
99+
# ReSharper is a .NET coding add-in
100+
_ReSharper*/
101+
*.[Rr]e[Ss]harper
102+
103+
# TeamCity is a build add-in
104+
_TeamCity*
105+
106+
# DotCover is a Code Coverage Tool
107+
*.dotCover
108+
109+
# NCrunch
110+
*.ncrunch*
111+
.*crunch*.local.xml
112+
113+
# Installshield output folder
114+
[Ee]xpress/
115+
116+
# DocProject is a documentation generator add-in
117+
DocProject/buildhelp/
118+
DocProject/Help/*.HxT
119+
DocProject/Help/*.HxC
120+
DocProject/Help/*.hhc
121+
DocProject/Help/*.hhk
122+
DocProject/Help/*.hhp
123+
DocProject/Help/Html2
124+
DocProject/Help/html
125+
126+
# Click-Once directory
127+
publish/
128+
129+
# Publish Web Output
130+
*.Publish.xml
131+
*.pubxml
132+
133+
# NuGet Packages Directory
134+
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
135+
#packages/
136+
137+
# Windows Azure Build Output
138+
csx
139+
*.build.csdef
140+
141+
# Windows Store app package directory
142+
AppPackages/
143+
144+
# Others
145+
sql/
146+
*.Cache
147+
ClientBin/
148+
[Ss]tyle[Cc]op.*
149+
~$*
150+
*~
151+
*.dbmdl
152+
*.[Pp]ublish.xml
153+
*.pfx
154+
*.publishsettings
155+
156+
# RIA/Silverlight projects
157+
Generated_Code/
158+
159+
# Backup & report files from converting an old project file to a newer
160+
# Visual Studio version. Backup files are not needed, because we have git ;-)
161+
_UpgradeReport_Files/
162+
Backup*/
163+
UpgradeLog*.XML
164+
UpgradeLog*.htm
165+
166+
# SQL Server files
167+
App_Data/*.mdf
168+
App_Data/*.ldf
169+
170+
#############
171+
## Windows detritus
172+
#############
173+
174+
# Windows image file caches
175+
Thumbs.db
176+
ehthumbs.db
177+
178+
# Folder config file
179+
Desktop.ini
180+
181+
# Recycle Bin used on file shares
182+
$RECYCLE.BIN/
183+
184+
# Mac crap
185+
.DS_Store
186+
187+
188+
#############
189+
## Python
190+
#############
191+
192+
*.py[co]
193+
194+
# Packages
195+
*.egg
196+
*.egg-info
197+
dist/
198+
build/
199+
eggs/
200+
parts/
201+
var/
202+
sdist/
203+
develop-eggs/
204+
.installed.cfg
205+
206+
# Installer logs
207+
pip-log.txt
208+
209+
# Unit test / coverage reports
210+
.coverage
211+
.tox
212+
213+
#Translations
214+
*.mo
215+
216+
#Mr Developer
217+
.mr.developer.cfg

Font.cpp

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
#include "Font.h"
2+
3+
Font::Font()
4+
{
5+
UnsupportedChar = new FontChar(3, 6, 0, 252783);
6+
7+
Chars = new FontChar*[255];
8+
9+
// Unsupported chars: 0-31
10+
for (int i=0; i<=31; ++i)
11+
Chars[i] = UnsupportedChar;
12+
13+
Chars[32] = new FontChar(2, 1, 0, 0); //
14+
Chars[33] = new FontChar(1, 5, 1, 23); // !
15+
16+
// Unsupported chars: 34-43
17+
for (int i=34; i<=43; ++i)
18+
Chars[i] = UnsupportedChar;
19+
20+
Chars[44] = new FontChar(2, 2, 5, 6); // ,
21+
Chars[45] = new FontChar(3, 1, 3, 7); // -
22+
Chars[46] = new FontChar(1, 1, 5, 1); // .
23+
Chars[47] = UnsupportedChar; // /
24+
Chars[48] = new FontChar(4, 5, 1, 432534); // 0
25+
Chars[49] = new FontChar(2, 5, 1, 683); // 1
26+
Chars[50] = new FontChar(4, 5, 1, 988807); // 2
27+
Chars[51] = new FontChar(4, 5, 1, 493191); // 3
28+
Chars[52] = new FontChar(4, 5, 1, 324964); // 4
29+
Chars[53] = new FontChar(4, 5, 1, 493343); // 5
30+
Chars[54] = new FontChar(4, 5, 1, 431894); // 6
31+
Chars[55] = new FontChar(4, 5, 1, 140431); // 7
32+
Chars[56] = new FontChar(4, 5, 1, 431766); // 8
33+
Chars[57] = new FontChar(4, 5, 1, 429718); // 9
34+
35+
// Unsupported chars: 58-59
36+
for (int i=58; i<=59; ++i)
37+
Chars[i] = UnsupportedChar;
38+
39+
Chars[60] = new FontChar(3, 5, 1, 17492); // <
40+
Chars[61] = UnsupportedChar; // =
41+
Chars[62] = new FontChar(3, 5, 1, 5393); // >
42+
Chars[63] = new FontChar(4, 5, 1, 132743); // ?
43+
Chars[64] = UnsupportedChar; // @
44+
Chars[65] = new FontChar(4, 5, 1, 653718); // A
45+
Chars[66] = new FontChar(4, 5, 1, 497559); // B
46+
Chars[67] = new FontChar(3, 5, 1, 25166); // C
47+
Chars[68] = new FontChar(4, 5, 1, 498071); // D
48+
Chars[69] = new FontChar(3, 5, 1, 29647); // E
49+
Chars[70] = new FontChar(3, 5, 1, 5071); // F
50+
Chars[71] = new FontChar(4, 5, 1, 957726); // G
51+
Chars[72] = new FontChar(4, 5, 1, 630681); // H
52+
Chars[73] = new FontChar(3, 5, 1, 29847); // I
53+
Chars[74] = UnsupportedChar; // J
54+
Chars[75] = new FontChar(4, 5, 1, 611161); // K
55+
Chars[76] = new FontChar(3, 5, 1, 29257); // L
56+
Chars[77] = new FontChar(5, 5, 1, 18405233); // M
57+
Chars[78] = new FontChar(4, 5, 1, 630201); // N
58+
Chars[79] = new FontChar(4, 5, 1, 432534); // O
59+
Chars[80] = new FontChar(4, 5, 1, 96663); // P
60+
Chars[81] = new FontChar(4, 6, 1, 8821142); // Q
61+
Chars[82] = new FontChar(4, 5, 1, 620951); // R
62+
Chars[83] = new FontChar(4, 5, 1, 493086); // S
63+
Chars[84] = new FontChar(3, 5, 1, 9367); // T
64+
Chars[85] = new FontChar(4, 5, 1, 432537); // U
65+
Chars[86] = new FontChar(4, 5, 1, 152985); // V
66+
Chars[87] = new FontChar(5, 5, 1, 11196081); // W
67+
Chars[88] = new FontChar(4, 5, 1, 628377); // X
68+
Chars[89] = new FontChar(4, 5, 1, 429721); // Y
69+
Chars[90] = new FontChar(3, 5, 1, 29351); // Z
70+
71+
// Unsupported chars: 91-96
72+
for (int i=91; i<=96; ++i)
73+
Chars[i] = UnsupportedChar;
74+
75+
Chars[97] = new FontChar(4, 4, 2, 59806); // a
76+
Chars[98] = new FontChar(4, 5, 1, 498033); // b
77+
Chars[99] = new FontChar(3, 4, 2, 3150); // c
78+
Chars[100] = new FontChar(4, 5, 1, 956904); // d
79+
Chars[101] = new FontChar(4, 4, 2, 25558); // e
80+
Chars[102] = new FontChar(3, 5, 1, 9684); // f
81+
Chars[103] = new FontChar(4, 6, 2, 6875550); // g
82+
Chars[104] = new FontChar(4, 5, 1, 629105); // h
83+
Chars[105] = new FontChar(1, 5, 1, 29); // i
84+
Chars[106] = new FontChar(2, 7, 1, 6818); // j
85+
Chars[107] = new FontChar(4, 5, 1, 619921); // k
86+
Chars[108] = new FontChar(1, 5, 1, 31); // l
87+
Chars[109] = new FontChar(5, 4, 2, 710319); // m
88+
Chars[110] = new FontChar(4, 4, 2, 39319); // n
89+
Chars[111] = new FontChar(4, 4, 2, 27030); // o
90+
Chars[112] = new FontChar(4, 6, 2, 1145239); // p
91+
Chars[113] = new FontChar(4, 6, 2, 8972702); // q
92+
Chars[114] = new FontChar(3, 4, 2, 605); // r
93+
Chars[115] = new FontChar(4, 4, 2, 31806); // s
94+
Chars[116] = new FontChar(3, 5, 1, 17594); // t
95+
Chars[117] = new FontChar(4, 4, 2, 59801); // u
96+
Chars[118] = new FontChar(4, 4, 2, 9625); // v
97+
Chars[119] = new FontChar(5, 4, 2, 338613); // w
98+
Chars[120] = new FontChar(3, 4, 2, 2709); // x
99+
Chars[121] = new FontChar(4, 6, 2, 6875545); // y
100+
Chars[122] = new FontChar(4, 4, 2, 62031); // z
101+
102+
// Unsupported chars: 123-254
103+
for (int i=123; i<=254; ++i) Chars[i] = UnsupportedChar;
104+
}
105+
106+
void Font::MeasureString(const String& str, int& width, int& height, int spacing)
107+
{
108+
width = 0;
109+
height = 0;
110+
111+
for (int i=0; i<str.length(); ++i)
112+
{
113+
char c = str[i];
114+
FontChar* fontChar = Chars[(int)c];
115+
116+
width += fontChar->Width + spacing;
117+
if (fontChar->Height > height)
118+
height = fontChar->Height;
119+
}
120+
}

0 commit comments

Comments
 (0)