Permalink
Browse files

Figuring out how to add text to the scene graph but still have it look

nice.
  • Loading branch information...
1 parent bba2c2b commit 3d0d574a58cd6440d8118ac44aa5ee3a37739235 @angusforbes committed May 5, 2012
View
16 BlobDetectorIOS/BlobDetectorIOS.xcodeproj/project.pbxproj
@@ -61,6 +61,10 @@
925BB6EA15533CE20011F9D2 /* Container.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 925BB6E815533CE20011F9D2 /* Container.cpp */; };
925BB6ED15533D540011F9D2 /* ContainerBlobInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 925BB6EC15533D540011F9D2 /* ContainerBlobInfo.mm */; };
92AA4F4F155497900049CED2 /* Color.mm in Sources */ = {isa = PBXBuildFile; fileRef = 92AA4F4E155497900049CED2 /* Color.mm */; };
+ 92AA4F60155503BA0049CED2 /* Helvetica36.fnt in Resources */ = {isa = PBXBuildFile; fileRef = 92AA4F5E155503B80049CED2 /* Helvetica36.fnt */; };
+ 92AA4F61155503BA0049CED2 /* Helvetica36.png in Resources */ = {isa = PBXBuildFile; fileRef = 92AA4F5F155503B90049CED2 /* Helvetica36.png */; };
+ 92AA4F64155506E70049CED2 /* Univers36.fnt in Resources */ = {isa = PBXBuildFile; fileRef = 92AA4F62155506E50049CED2 /* Univers36.fnt */; };
+ 92AA4F65155506E70049CED2 /* Univers36.png in Resources */ = {isa = PBXBuildFile; fileRef = 92AA4F63155506E50049CED2 /* Univers36.png */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -163,6 +167,10 @@
925BB6EC15533D540011F9D2 /* ContainerBlobInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContainerBlobInfo.mm; sourceTree = "<group>"; };
92AA4F4D155497900049CED2 /* Color.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Color.hpp; sourceTree = "<group>"; };
92AA4F4E155497900049CED2 /* Color.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Color.mm; sourceTree = "<group>"; };
+ 92AA4F5E155503B80049CED2 /* Helvetica36.fnt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Helvetica36.fnt; sourceTree = "<group>"; };
+ 92AA4F5F155503B90049CED2 /* Helvetica36.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Helvetica36.png; sourceTree = "<group>"; };
+ 92AA4F62155506E50049CED2 /* Univers36.fnt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Univers36.fnt; sourceTree = "<group>"; };
+ 92AA4F63155506E50049CED2 /* Univers36.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Univers36.png; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -236,6 +244,10 @@
925BB6E715533A230011F9D2 /* DoubleSlider.h */,
925BB6EB15533D540011F9D2 /* ContainerBlobInfo.h */,
925BB6EC15533D540011F9D2 /* ContainerBlobInfo.mm */,
+ 92AA4F62155506E50049CED2 /* Univers36.fnt */,
+ 92AA4F63155506E50049CED2 /* Univers36.png */,
+ 92AA4F5E155503B80049CED2 /* Helvetica36.fnt */,
+ 92AA4F5F155503B90049CED2 /* Helvetica36.png */,
925BB67715532FE20011F9D2 /* Geometry */,
925BB69615532FE20011F9D2 /* Math */,
925BB69B15532FE20011F9D2 /* Utils */,
@@ -414,6 +426,10 @@
925BB6DE155330FC0011F9D2 /* AlloPano5Mbps.mov in Resources */,
925BB6DF155330FC0011F9D2 /* blobTest1.png in Resources */,
925BB6E0155330FC0011F9D2 /* testvid.m4v in Resources */,
+ 92AA4F60155503BA0049CED2 /* Helvetica36.fnt in Resources */,
+ 92AA4F61155503BA0049CED2 /* Helvetica36.png in Resources */,
+ 92AA4F64155506E70049CED2 /* Univers36.fnt in Resources */,
+ 92AA4F65155506E70049CED2 /* Univers36.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
BIN ...xcodeproj/project.xcworkspace/xcuserdata/angus.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
View
26 BlobDetectorIOS/BlobDetectorIOS/ContainerBlobInfo.mm
@@ -1,6 +1,6 @@
#include "ContainerBlobInfo.h"
-
-
+#include "Renderer.hpp"
+#include "TextRect.hpp"
ContainerBlobInfo::ContainerBlobInfo() {
@@ -9,9 +9,26 @@
void ContainerBlobInfo::InstallWidgets() {
- float sliderH = 0.9;
+ float sliderH = 0.7;
float sliderInc = (1.0/6.0);
+
+
+
+ Renderer::GetRenderer()->GetFont("Helvetica36")->Bind(); {
+ TextRect* t1 = new TextRect("hell....!!o");
+ t1->SetTranslate(0.15,0.2,0);
+ t1->SetHeight(0.2);
+
+ t1->SetBackgroundColor(Color::Float(0.5));
+ t1->SetColor(Color::RGB(255,255,255,255));
+
+ AddGeom(t1);
+ }
+
+ //text above y=0.7
+ //sliders below y=0.7
+
doubleSliderRed = new DoubleSlider(this);
doubleSliderRed->CenterAt(sliderInc * 0 + sliderInc/2.0, 0.5);
doubleSliderRed->SetColor(Color::RGB(255,0,0));
@@ -34,6 +51,7 @@
AddGeom(doubleSliderBlue);
pixelView = new Rectangle();
+ pixelView->drawBorder = true;
pixelView->CenterAt(sliderInc * 3 + sliderInc/2.0, 0.5);
pixelView->SetColor(Color::RGB(150));
pixelView->SetScale(sliderInc*.75, 0.3);
@@ -96,7 +114,7 @@
Container::Draw();
- Rectangle::Draw();
+ //Rectangle::Draw();
View
99 BlobDetectorIOS/BlobDetectorIOS/Helvetica36.fnt
@@ -0,0 +1,99 @@
+info face="HelveticaNeue" size=36 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=0,0
+common lineHeight=43 base=34 scaleW=256 scaleH=256 pages=1 packed=0
+page id=0 file="Helvetica36.png"
+chars count=95
+char id=124 x=0 y=0 width=4 height=37 xoffset=2 yoffset=5 xadvance=8 page=0 chnl=0 letter="|"
+char id=123 x=4 y=0 width=11 height=35 xoffset=1 yoffset=7 xadvance=12 page=0 chnl=0 letter="{"
+char id=125 x=15 y=0 width=11 height=35 xoffset=0 yoffset=7 xadvance=12 page=0 chnl=0 letter="}"
+char id=40 x=26 y=0 width=9 height=35 xoffset=1 yoffset=7 xadvance=9 page=0 chnl=0 letter="("
+char id=41 x=35 y=0 width=9 height=35 xoffset=-1 yoffset=7 xadvance=9 page=0 chnl=0 letter=")"
+char id=91 x=44 y=0 width=8 height=35 xoffset=2 yoffset=7 xadvance=9 page=0 chnl=0 letter="["
+char id=93 x=52 y=0 width=7 height=35 xoffset=0 yoffset=7 xadvance=9 page=0 chnl=0 letter="]"
+char id=106 x=59 y=0 width=7 height=34 xoffset=-1 yoffset=8 xadvance=8 page=0 chnl=0 letter="j"
+char id=36 x=66 y=0 width=19 height=33 xoffset=0 yoffset=5 xadvance=20 page=0 chnl=0 letter="$"
+char id=81 x=85 y=0 width=25 height=30 xoffset=1 yoffset=7 xadvance=27 page=0 chnl=0 letter="Q"
+char id=64 x=110 y=0 width=27 height=28 xoffset=1 yoffset=7 xadvance=29 page=0 chnl=0 letter="@"
+char id=79 x=137 y=0 width=25 height=28 xoffset=1 yoffset=7 xadvance=27 page=0 chnl=0 letter="O"
+char id=71 x=162 y=0 width=25 height=28 xoffset=1 yoffset=7 xadvance=27 page=0 chnl=0 letter="G"
+char id=67 x=187 y=0 width=24 height=28 xoffset=1 yoffset=7 xadvance=26 page=0 chnl=0 letter="C"
+char id=83 x=211 y=0 width=21 height=28 xoffset=1 yoffset=7 xadvance=23 page=0 chnl=0 letter="S"
+char id=112 x=232 y=0 width=19 height=28 xoffset=2 yoffset=14 xadvance=21 page=0 chnl=0 letter="p"
+char id=113 x=0 y=37 width=18 height=28 xoffset=1 yoffset=14 xadvance=21 page=0 chnl=0 letter="q"
+char id=103 x=18 y=37 width=18 height=28 xoffset=1 yoffset=14 xadvance=21 page=0 chnl=0 letter="g"
+char id=47 x=36 y=37 width=14 height=28 xoffset=-1 yoffset=7 xadvance=12 page=0 chnl=0 letter="/"
+char id=92 x=50 y=37 width=14 height=28 xoffset=-1 yoffset=7 xadvance=12 page=0 chnl=0 letter="\"
+char id=37 x=64 y=37 width=30 height=27 xoffset=3 yoffset=8 xadvance=36 page=0 chnl=0 letter="%"
+char id=38 x=94 y=37 width=23 height=27 xoffset=1 yoffset=8 xadvance=23 page=0 chnl=0 letter="&"
+char id=85 x=117 y=37 width=22 height=27 xoffset=2 yoffset=8 xadvance=26 page=0 chnl=0 letter="U"
+char id=98 x=139 y=37 width=19 height=27 xoffset=2 yoffset=8 xadvance=21 page=0 chnl=0 letter="b"
+char id=100 x=158 y=37 width=18 height=27 xoffset=1 yoffset=8 xadvance=21 page=0 chnl=0 letter="d"
+char id=121 x=176 y=37 width=18 height=27 xoffset=0 yoffset=15 xadvance=18 page=0 chnl=0 letter="y"
+char id=54 x=194 y=37 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="6"
+char id=56 x=212 y=37 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="8"
+char id=48 x=230 y=37 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="0"
+char id=51 x=0 y=65 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="3"
+char id=57 x=18 y=65 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="9"
+char id=53 x=36 y=65 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="5"
+char id=74 x=54 y=65 width=16 height=27 xoffset=0 yoffset=8 xadvance=19 page=0 chnl=0 letter="J"
+char id=63 x=70 y=65 width=16 height=27 xoffset=2 yoffset=7 xadvance=20 page=0 chnl=0 letter="?"
+char id=87 x=86 y=65 width=33 height=26 xoffset=0 yoffset=8 xadvance=33 page=0 chnl=0 letter="W"
+char id=77 x=119 y=65 width=27 height=26 xoffset=2 yoffset=8 xadvance=31 page=0 chnl=0 letter="M"
+char id=65 x=146 y=65 width=25 height=26 xoffset=-1 yoffset=8 xadvance=23 page=0 chnl=0 letter="A"
+char id=89 x=171 y=65 width=24 height=26 xoffset=0 yoffset=8 xadvance=23 page=0 chnl=0 letter="Y"
+char id=86 x=195 y=65 width=23 height=26 xoffset=0 yoffset=8 xadvance=22 page=0 chnl=0 letter="V"
+char id=75 x=218 y=65 width=23 height=26 xoffset=2 yoffset=8 xadvance=24 page=0 chnl=0 letter="K"
+char id=88 x=0 y=92 width=22 height=26 xoffset=0 yoffset=8 xadvance=22 page=0 chnl=0 letter="X"
+char id=68 x=22 y=92 width=22 height=26 xoffset=2 yoffset=8 xadvance=25 page=0 chnl=0 letter="D"
+char id=82 x=44 y=92 width=22 height=26 xoffset=2 yoffset=8 xadvance=25 page=0 chnl=0 letter="R"
+char id=90 x=66 y=92 width=22 height=26 xoffset=0 yoffset=8 xadvance=22 page=0 chnl=0 letter="Z"
+char id=78 x=88 y=92 width=22 height=26 xoffset=2 yoffset=8 xadvance=26 page=0 chnl=0 letter="N"
+char id=72 x=110 y=92 width=22 height=26 xoffset=2 yoffset=8 xadvance=26 page=0 chnl=0 letter="H"
+char id=66 x=132 y=92 width=22 height=26 xoffset=2 yoffset=8 xadvance=25 page=0 chnl=0 letter="B"
+char id=84 x=154 y=92 width=21 height=26 xoffset=0 yoffset=8 xadvance=21 page=0 chnl=0 letter="T"
+char id=80 x=175 y=92 width=20 height=26 xoffset=2 yoffset=8 xadvance=23 page=0 chnl=0 letter="P"
+char id=69 x=195 y=92 width=19 height=26 xoffset=2 yoffset=8 xadvance=22 page=0 chnl=0 letter="E"
+char id=76 x=214 y=92 width=18 height=26 xoffset=2 yoffset=8 xadvance=20 page=0 chnl=0 letter="L"
+char id=70 x=232 y=92 width=18 height=26 xoffset=2 yoffset=8 xadvance=21 page=0 chnl=0 letter="F"
+char id=52 x=0 y=118 width=18 height=26 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="4"
+char id=50 x=18 y=118 width=18 height=26 xoffset=0 yoffset=8 xadvance=20 page=0 chnl=0 letter="2"
+char id=35 x=36 y=118 width=18 height=26 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="#"
+char id=55 x=54 y=118 width=18 height=26 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="7"
+char id=107 x=72 y=118 width=17 height=26 xoffset=2 yoffset=8 xadvance=19 page=0 chnl=0 letter="k"
+char id=104 x=89 y=118 width=16 height=26 xoffset=2 yoffset=8 xadvance=20 page=0 chnl=0 letter="h"
+char id=102 x=105 y=118 width=11 height=26 xoffset=0 yoffset=8 xadvance=11 page=0 chnl=0 letter="f"
+char id=49 x=116 y=118 width=10 height=26 xoffset=3 yoffset=8 xadvance=20 page=0 chnl=0 letter="1"
+char id=33 x=126 y=118 width=5 height=26 xoffset=2 yoffset=8 xadvance=9 page=0 chnl=0 letter="!"
+char id=73 x=131 y=118 width=5 height=26 xoffset=2 yoffset=8 xadvance=9 page=0 chnl=0 letter="I"
+char id=105 x=136 y=118 width=4 height=26 xoffset=2 yoffset=8 xadvance=8 page=0 chnl=0 letter="i"
+char id=108 x=140 y=118 width=4 height=26 xoffset=2 yoffset=8 xadvance=8 page=0 chnl=0 letter="l"
+char id=116 x=144 y=118 width=11 height=25 xoffset=0 yoffset=9 xadvance=11 page=0 chnl=0 letter="t"
+char id=59 x=155 y=118 width=5 height=25 xoffset=2 yoffset=15 xadvance=10 page=0 chnl=0 letter=";"
+char id=111 x=160 y=118 width=19 height=21 xoffset=1 yoffset=14 xadvance=21 page=0 chnl=0 letter="o"
+char id=97 x=179 y=118 width=18 height=21 xoffset=1 yoffset=14 xadvance=19 page=0 chnl=0 letter="a"
+char id=101 x=197 y=118 width=18 height=21 xoffset=1 yoffset=14 xadvance=19 page=0 chnl=0 letter="e"
+char id=99 x=215 y=118 width=18 height=21 xoffset=1 yoffset=14 xadvance=19 page=0 chnl=0 letter="c"
+char id=115 x=233 y=118 width=16 height=21 xoffset=1 yoffset=14 xadvance=18 page=0 chnl=0 letter="s"
+char id=109 x=0 y=144 width=27 height=20 xoffset=2 yoffset=14 xadvance=31 page=0 chnl=0 letter="m"
+char id=60 x=27 y=144 width=19 height=20 xoffset=1 yoffset=15 xadvance=22 page=0 chnl=0 letter="<"
+char id=62 x=46 y=144 width=19 height=20 xoffset=1 yoffset=15 xadvance=22 page=0 chnl=0 letter=">"
+char id=117 x=65 y=144 width=16 height=20 xoffset=2 yoffset=15 xadvance=20 page=0 chnl=0 letter="u"
+char id=110 x=81 y=144 width=16 height=20 xoffset=2 yoffset=14 xadvance=20 page=0 chnl=0 letter="n"
+char id=114 x=97 y=144 width=10 height=20 xoffset=2 yoffset=14 xadvance=12 page=0 chnl=0 letter="r"
+char id=119 x=107 y=144 width=27 height=19 xoffset=0 yoffset=15 xadvance=27 page=0 chnl=0 letter="w"
+char id=120 x=134 y=144 width=19 height=19 xoffset=0 yoffset=15 xadvance=19 page=0 chnl=0 letter="x"
+char id=43 x=153 y=144 width=19 height=19 xoffset=1 yoffset=15 xadvance=22 page=0 chnl=0 letter="+"
+char id=118 x=172 y=144 width=18 height=19 xoffset=0 yoffset=15 xadvance=18 page=0 chnl=0 letter="v"
+char id=122 x=190 y=144 width=17 height=19 xoffset=0 yoffset=15 xadvance=17 page=0 chnl=0 letter="z"
+char id=58 x=207 y=144 width=5 height=19 xoffset=2 yoffset=15 xadvance=10 page=0 chnl=0 letter=":"
+char id=94 x=212 y=144 width=19 height=17 xoffset=1 yoffset=8 xadvance=22 page=0 chnl=0 letter="^"
+char id=42 x=231 y=144 width=12 height=11 xoffset=0 yoffset=8 xadvance=13 page=0 chnl=0 letter="*"
+char id=61 x=0 y=164 width=19 height=10 xoffset=1 yoffset=20 xadvance=22 page=0 chnl=0 letter="="
+char id=34 x=19 y=164 width=9 height=10 xoffset=3 yoffset=8 xadvance=15 page=0 chnl=0 letter="""
+char id=44 x=28 y=164 width=5 height=10 xoffset=2 yoffset=30 xadvance=10 page=0 chnl=0 letter=","
+char id=39 x=33 y=164 width=4 height=10 xoffset=3 yoffset=8 xadvance=10 page=0 chnl=0 letter="'"
+char id=126 x=37 y=164 width=18 height=6 xoffset=2 yoffset=22 xadvance=22 page=0 chnl=0 letter="~"
+char id=96 x=55 y=164 width=8 height=6 xoffset=-1 yoffset=7 xadvance=8 page=0 chnl=0 letter="`"
+char id=45 x=63 y=164 width=12 height=4 xoffset=1 yoffset=22 xadvance=14 page=0 chnl=0 letter="-"
+char id=46 x=75 y=164 width=5 height=4 xoffset=2 yoffset=30 xadvance=10 page=0 chnl=0 letter="."
+char id=95 x=80 y=164 width=18 height=3 xoffset=0 yoffset=36 xadvance=18 page=0 chnl=0 letter="_"
+char id=32 x=98 y=164 width=0 height=0 xoffset=0 yoffset=154 xadvance=10 page=0 chnl=0 letter="space"
View
BIN BlobDetectorIOS/BlobDetectorIOS/Helvetica36.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
30 BlobDetectorIOS/BlobDetectorIOS/RendererBlobDetector.mm
@@ -42,6 +42,36 @@
+
+/*
+ // GetFont("CMUSerifUprightItalic60")->Bind(); {
+ GetFont("Univers36")->Bind(); {
+ //TextRect* t1 = new TextRect(GetFont("CMUSerifUprightItalic60"), "hello");
+ TextRect* t1 = new TextRect("@@!@#hello");
+ t1->SetTranslate(0.3,0,0);
+ t1->SetHeight(0.15);
+ t1->SetBackgroundColor(Color::Float(1.0,0,0,0.7));
+ t1->SetColor(Color::Float(0.0,0,1.0,1.0));
+
+ AddGeom(t1);
+ }
+*/
+ /*
+
+ Renderer::GetRenderer()->GetFont("Helvetica36")->Bind(); {
+ TextRect* t1 = new TextRect("hell....!!o");
+ t1->SetTranslate(0.15,0.5,0);
+ t1->SetHeight(0.5);
+
+ // t1->SetBackgroundColor(Color::Float(0.5));
+ t1->SetBackgroundColor(Color::Float(1.0,0,0,0.7));
+ t1->SetColor(Color::RGB(255,255,255,255));
+
+ AddGeom(t1);
+ }
+*/
+
+
/*
int numSliders = 3;
View
99 BlobDetectorIOS/BlobDetectorIOS/Univers36.fnt
@@ -0,0 +1,99 @@
+info face="Univers" size=36 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=0,0
+common lineHeight=43 base=34 scaleW=256 scaleH=256 pages=1 packed=0
+page id=0 file="Univers36.png"
+chars count=95
+char id=124 x=0 y=0 width=4 height=36 xoffset=3 yoffset=7 xadvance=9 page=0 chnl=0 letter="|"
+char id=106 x=4 y=0 width=9 height=34 xoffset=-1 yoffset=8 xadvance=10 page=0 chnl=0 letter="j"
+char id=36 x=13 y=0 width=19 height=33 xoffset=1 yoffset=5 xadvance=20 page=0 chnl=0 letter="$"
+char id=123 x=32 y=0 width=13 height=32 xoffset=0 yoffset=7 xadvance=12 page=0 chnl=0 letter="{"
+char id=125 x=45 y=0 width=13 height=32 xoffset=0 yoffset=7 xadvance=12 page=0 chnl=0 letter="}"
+char id=40 x=58 y=0 width=8 height=32 xoffset=2 yoffset=7 xadvance=12 page=0 chnl=0 letter="("
+char id=41 x=66 y=0 width=8 height=32 xoffset=2 yoffset=7 xadvance=12 page=0 chnl=0 letter=")"
+char id=91 x=74 y=0 width=7 height=32 xoffset=3 yoffset=7 xadvance=12 page=0 chnl=0 letter="["
+char id=93 x=81 y=0 width=7 height=32 xoffset=2 yoffset=7 xadvance=12 page=0 chnl=0 letter="]"
+char id=37 x=88 y=0 width=30 height=29 xoffset=1 yoffset=7 xadvance=32 page=0 chnl=0 letter="%"
+char id=38 x=118 y=0 width=27 height=28 xoffset=1 yoffset=7 xadvance=28 page=0 chnl=0 letter="&"
+char id=64 x=145 y=0 width=27 height=28 xoffset=5 yoffset=7 xadvance=37 page=0 chnl=0 letter="@"
+char id=81 x=172 y=0 width=26 height=28 xoffset=2 yoffset=7 xadvance=28 page=0 chnl=0 letter="Q"
+char id=79 x=198 y=0 width=24 height=28 xoffset=2 yoffset=7 xadvance=28 page=0 chnl=0 letter="O"
+char id=71 x=222 y=0 width=23 height=28 xoffset=2 yoffset=7 xadvance=28 page=0 chnl=0 letter="G"
+char id=67 x=0 y=36 width=22 height=28 xoffset=1 yoffset=7 xadvance=24 page=0 chnl=0 letter="C"
+char id=83 x=22 y=36 width=21 height=28 xoffset=1 yoffset=7 xadvance=24 page=0 chnl=0 letter="S"
+char id=85 x=43 y=36 width=22 height=27 xoffset=3 yoffset=8 xadvance=28 page=0 chnl=0 letter="U"
+char id=98 x=65 y=36 width=19 height=27 xoffset=2 yoffset=8 xadvance=22 page=0 chnl=0 letter="b"
+char id=100 x=84 y=36 width=19 height=27 xoffset=1 yoffset=8 xadvance=22 page=0 chnl=0 letter="d"
+char id=113 x=103 y=36 width=19 height=27 xoffset=1 yoffset=15 xadvance=22 page=0 chnl=0 letter="q"
+char id=56 x=122 y=36 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="8"
+char id=48 x=140 y=36 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="0"
+char id=51 x=158 y=36 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="3"
+char id=57 x=176 y=36 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="9"
+char id=54 x=194 y=36 width=18 height=27 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="6"
+char id=112 x=212 y=36 width=18 height=27 xoffset=3 yoffset=15 xadvance=22 page=0 chnl=0 letter="p"
+char id=103 x=230 y=36 width=18 height=27 xoffset=1 yoffset=15 xadvance=22 page=0 chnl=0 letter="g"
+char id=74 x=0 y=64 width=17 height=27 xoffset=0 yoffset=8 xadvance=20 page=0 chnl=0 letter="J"
+char id=53 x=17 y=64 width=17 height=27 xoffset=2 yoffset=8 xadvance=20 page=0 chnl=0 letter="5"
+char id=63 x=34 y=64 width=14 height=27 xoffset=2 yoffset=7 xadvance=18 page=0 chnl=0 letter="?"
+char id=102 x=48 y=64 width=13 height=27 xoffset=0 yoffset=7 xadvance=12 page=0 chnl=0 letter="f"
+char id=47 x=61 y=64 width=12 height=27 xoffset=-1 yoffset=8 xadvance=10 page=0 chnl=0 letter="/"
+char id=92 x=73 y=64 width=12 height=27 xoffset=-1 yoffset=8 xadvance=10 page=0 chnl=0 letter="\"
+char id=87 x=85 y=64 width=36 height=26 xoffset=0 yoffset=8 xadvance=36 page=0 chnl=0 letter="W"
+char id=77 x=121 y=64 width=28 height=26 xoffset=3 yoffset=8 xadvance=34 page=0 chnl=0 letter="M"
+char id=65 x=149 y=64 width=26 height=26 xoffset=0 yoffset=8 xadvance=26 page=0 chnl=0 letter="A"
+char id=88 x=175 y=64 width=26 height=26 xoffset=0 yoffset=8 xadvance=26 page=0 chnl=0 letter="X"
+char id=89 x=201 y=64 width=25 height=26 xoffset=0 yoffset=8 xadvance=24 page=0 chnl=0 letter="Y"
+char id=86 x=226 y=64 width=24 height=26 xoffset=0 yoffset=8 xadvance=24 page=0 chnl=0 letter="V"
+char id=84 x=0 y=91 width=22 height=26 xoffset=0 yoffset=8 xadvance=22 page=0 chnl=0 letter="T"
+char id=68 x=22 y=91 width=22 height=26 xoffset=3 yoffset=8 xadvance=26 page=0 chnl=0 letter="D"
+char id=78 x=44 y=91 width=22 height=26 xoffset=3 yoffset=8 xadvance=28 page=0 chnl=0 letter="N"
+char id=75 x=66 y=91 width=21 height=26 xoffset=3 yoffset=8 xadvance=24 page=0 chnl=0 letter="K"
+char id=72 x=87 y=91 width=20 height=26 xoffset=3 yoffset=8 xadvance=26 page=0 chnl=0 letter="H"
+char id=90 x=107 y=91 width=20 height=26 xoffset=1 yoffset=8 xadvance=22 page=0 chnl=0 letter="Z"
+char id=35 x=127 y=91 width=20 height=26 xoffset=0 yoffset=8 xadvance=20 page=0 chnl=0 letter="#"
+char id=52 x=147 y=91 width=20 height=26 xoffset=0 yoffset=8 xadvance=20 page=0 chnl=0 letter="4"
+char id=82 x=167 y=91 width=19 height=26 xoffset=3 yoffset=8 xadvance=24 page=0 chnl=0 letter="R"
+char id=66 x=186 y=91 width=19 height=26 xoffset=3 yoffset=8 xadvance=24 page=0 chnl=0 letter="B"
+char id=80 x=205 y=91 width=18 height=26 xoffset=3 yoffset=8 xadvance=22 page=0 chnl=0 letter="P"
+char id=69 x=223 y=91 width=18 height=26 xoffset=2 yoffset=8 xadvance=22 page=0 chnl=0 letter="E"
+char id=76 x=0 y=117 width=17 height=26 xoffset=3 yoffset=8 xadvance=20 page=0 chnl=0 letter="L"
+char id=107 x=17 y=117 width=17 height=26 xoffset=2 yoffset=8 xadvance=18 page=0 chnl=0 letter="k"
+char id=55 x=34 y=117 width=17 height=26 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="7"
+char id=50 x=51 y=117 width=17 height=26 xoffset=1 yoffset=8 xadvance=20 page=0 chnl=0 letter="2"
+char id=104 x=68 y=117 width=16 height=26 xoffset=3 yoffset=8 xadvance=22 page=0 chnl=0 letter="h"
+char id=70 x=84 y=117 width=16 height=26 xoffset=3 yoffset=8 xadvance=20 page=0 chnl=0 letter="F"
+char id=49 x=100 y=117 width=11 height=26 xoffset=3 yoffset=8 xadvance=20 page=0 chnl=0 letter="1"
+char id=105 x=111 y=117 width=6 height=26 xoffset=2 yoffset=8 xadvance=10 page=0 chnl=0 letter="i"
+char id=33 x=117 y=117 width=5 height=26 xoffset=5 yoffset=8 xadvance=14 page=0 chnl=0 letter="!"
+char id=73 x=122 y=117 width=4 height=26 xoffset=3 yoffset=8 xadvance=10 page=0 chnl=0 letter="I"
+char id=108 x=126 y=117 width=4 height=26 xoffset=3 yoffset=8 xadvance=10 page=0 chnl=0 letter="l"
+char id=121 x=130 y=117 width=20 height=25 xoffset=0 yoffset=16 xadvance=20 page=0 chnl=0 letter="y"
+char id=116 x=150 y=117 width=12 height=24 xoffset=0 yoffset=11 xadvance=12 page=0 chnl=0 letter="t"
+char id=59 x=162 y=117 width=8 height=24 xoffset=1 yoffset=15 xadvance=10 page=0 chnl=0 letter=";"
+char id=43 x=170 y=117 width=20 height=20 xoffset=1 yoffset=15 xadvance=21 page=0 chnl=0 letter="+"
+char id=111 x=190 y=117 width=19 height=20 xoffset=1 yoffset=15 xadvance=22 page=0 chnl=0 letter="o"
+char id=101 x=209 y=117 width=18 height=20 xoffset=1 yoffset=15 xadvance=20 page=0 chnl=0 letter="e"
+char id=99 x=227 y=117 width=17 height=20 xoffset=1 yoffset=15 xadvance=18 page=0 chnl=0 letter="c"
+char id=97 x=0 y=143 width=17 height=20 xoffset=1 yoffset=15 xadvance=20 page=0 chnl=0 letter="a"
+char id=115 x=17 y=143 width=16 height=20 xoffset=1 yoffset=15 xadvance=18 page=0 chnl=0 letter="s"
+char id=109 x=33 y=143 width=28 height=19 xoffset=3 yoffset=15 xadvance=34 page=0 chnl=0 letter="m"
+char id=117 x=61 y=143 width=17 height=19 xoffset=2 yoffset=16 xadvance=22 page=0 chnl=0 letter="u"
+char id=110 x=78 y=143 width=17 height=19 xoffset=3 yoffset=15 xadvance=22 page=0 chnl=0 letter="n"
+char id=114 x=95 y=143 width=11 height=19 xoffset=3 yoffset=15 xadvance=14 page=0 chnl=0 letter="r"
+char id=58 x=106 y=143 width=4 height=19 xoffset=3 yoffset=15 xadvance=10 page=0 chnl=0 letter=":"
+char id=119 x=110 y=143 width=30 height=18 xoffset=0 yoffset=16 xadvance=30 page=0 chnl=0 letter="w"
+char id=118 x=140 y=143 width=20 height=18 xoffset=0 yoffset=16 xadvance=20 page=0 chnl=0 letter="v"
+char id=120 x=160 y=143 width=19 height=18 xoffset=0 yoffset=16 xadvance=20 page=0 chnl=0 letter="x"
+char id=60 x=179 y=143 width=19 height=18 xoffset=1 yoffset=16 xadvance=21 page=0 chnl=0 letter="<"
+char id=62 x=198 y=143 width=19 height=18 xoffset=1 yoffset=16 xadvance=21 page=0 chnl=0 letter=">"
+char id=122 x=217 y=143 width=14 height=18 xoffset=1 yoffset=16 xadvance=16 page=0 chnl=0 letter="z"
+char id=94 x=231 y=143 width=17 height=16 xoffset=2 yoffset=9 xadvance=21 page=0 chnl=0 letter="^"
+char id=42 x=0 y=163 width=16 height=15 xoffset=2 yoffset=8 xadvance=20 page=0 chnl=0 letter="*"
+char id=61 x=16 y=163 width=19 height=11 xoffset=1 yoffset=19 xadvance=21 page=0 chnl=0 letter="="
+char id=44 x=35 y=163 width=8 height=10 xoffset=1 yoffset=29 xadvance=10 page=0 chnl=0 letter=","
+char id=34 x=43 y=163 width=10 height=9 xoffset=2 yoffset=9 xadvance=14 page=0 chnl=0 letter="""
+char id=39 x=53 y=163 width=4 height=9 xoffset=3 yoffset=9 xadvance=10 page=0 chnl=0 letter="'"
+char id=126 x=57 y=163 width=21 height=6 xoffset=0 yoffset=22 xadvance=21 page=0 chnl=0 letter="~"
+char id=96 x=78 y=163 width=8 height=6 xoffset=0 yoffset=7 xadvance=10 page=0 chnl=0 letter="`"
+char id=46 x=86 y=163 width=5 height=5 xoffset=2 yoffset=29 xadvance=10 page=0 chnl=0 letter="."
+char id=95 x=91 y=163 width=18 height=3 xoffset=0 yoffset=36 xadvance=18 page=0 chnl=0 letter="_"
+char id=45 x=109 y=163 width=10 height=3 xoffset=1 yoffset=23 xadvance=12 page=0 chnl=0 letter="-"
+char id=32 x=119 y=163 width=0 height=0 xoffset=0 yoffset=154 xadvance=10 page=0 chnl=0 letter="space"
View
BIN BlobDetectorIOS/BlobDetectorIOS/Univers36.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
18 TextDemoIOS/TextDemoIOS.xcodeproj/project.pbxproj
@@ -8,6 +8,9 @@
/* Begin PBXBuildFile section */
929CCAE915422306004B2459 /* TextRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 929CCAE715422306004B2459 /* TextRect.cpp */; };
+ 92AA4F56155500710049CED2 /* Color.mm in Sources */ = {isa = PBXBuildFile; fileRef = 92AA4F55155500710049CED2 /* Color.mm */; };
+ 92AA4F5A1555009B0049CED2 /* Latch.mm in Sources */ = {isa = PBXBuildFile; fileRef = 92AA4F591555009B0049CED2 /* Latch.mm */; };
+ 92AA4F5D155500BC0049CED2 /* CameraManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 92AA4F5C155500BC0049CED2 /* CameraManager.mm */; };
92CD0AB1153E018F00833CFA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92CD0AB0153E018F00833CFA /* UIKit.framework */; };
92CD0AB3153E018F00833CFA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92CD0AB2153E018F00833CFA /* Foundation.framework */; };
92CD0AB5153E018F00833CFA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92CD0AB4153E018F00833CFA /* CoreGraphics.framework */; };
@@ -62,6 +65,12 @@
/* Begin PBXFileReference section */
929CCAE715422306004B2459 /* TextRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextRect.cpp; sourceTree = "<group>"; };
929CCAE815422306004B2459 /* TextRect.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = TextRect.hpp; sourceTree = "<group>"; };
+ 92AA4F54155500710049CED2 /* Color.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Color.hpp; sourceTree = "<group>"; };
+ 92AA4F55155500710049CED2 /* Color.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Color.mm; sourceTree = "<group>"; };
+ 92AA4F581555009B0049CED2 /* Latch.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = Latch.hpp; sourceTree = "<group>"; };
+ 92AA4F591555009B0049CED2 /* Latch.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Latch.mm; sourceTree = "<group>"; };
+ 92AA4F5B155500BC0049CED2 /* CameraManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CameraManager.h; sourceTree = "<group>"; };
+ 92AA4F5C155500BC0049CED2 /* CameraManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CameraManager.mm; sourceTree = "<group>"; };
92CD0AAC153E018F00833CFA /* TextDemoIOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TextDemoIOS.app; sourceTree = BUILT_PRODUCTS_DIR; };
92CD0AB0153E018F00833CFA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
92CD0AB2153E018F00833CFA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -291,6 +300,10 @@
92CD0AEE153E024300833CFA /* Utils */ = {
isa = PBXGroup;
children = (
+ 92AA4F581555009B0049CED2 /* Latch.hpp */,
+ 92AA4F591555009B0049CED2 /* Latch.mm */,
+ 92AA4F54155500710049CED2 /* Color.hpp */,
+ 92AA4F55155500710049CED2 /* Color.mm */,
92CD0AEF153E024300833CFA /* FBO.hpp */,
92CD0AF0153E024300833CFA /* FBO.mm */,
92CD0AF1153E024300833CFA /* FontAtlas.hpp */,
@@ -312,6 +325,8 @@
92CD0B12153E024C00833CFA /* IOS */ = {
isa = PBXGroup;
children = (
+ 92AA4F5B155500BC0049CED2 /* CameraManager.h */,
+ 92AA4F5C155500BC0049CED2 /* CameraManager.mm */,
92CD0B13153E024C00833CFA /* AudioManager.h */,
92CD0B14153E024C00833CFA /* AudioManager.mm */,
92CD0B15153E024C00833CFA /* Defines.h */,
@@ -444,6 +459,9 @@
92CD0B22153E024C00833CFA /* VideoManager.mm in Sources */,
92CD0B25153E026400833CFA /* TextDemo.mm in Sources */,
929CCAE915422306004B2459 /* TextRect.cpp in Sources */,
+ 92AA4F56155500710049CED2 /* Color.mm in Sources */,
+ 92AA4F5A1555009B0049CED2 /* Latch.mm in Sources */,
+ 92AA4F5D155500BC0049CED2 /* CameraManager.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
BIN ...xcodeproj/project.xcworkspace/xcuserdata/angus.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
View
15 TextDemoIOS/TextDemoIOS/TextDemo.mm
@@ -11,12 +11,13 @@
//you can place a text object directly in the scene graph...
- GetFont("CMUSerifUprightItalic60")->Bind(); {
+ //GetFont("CMUSerifUprightItalic60")->Bind(); {
+ GetFont("Univers36")->Bind(); {
//TextRect* t1 = new TextRect(GetFont("CMUSerifUprightItalic60"), "hello");
- TextRect* t1 = new TextRect("hello");
+ TextRect* t1 = new TextRect("@@!@#hello");
t1->SetTranslate(0.3,0,0);
t1->SetHeight(0.15);
- t1->SetBackgroundColor(1.0,0,0,0.7);
+ t1->SetBackgroundColor(Color::Float(1.0,0,0,0.7));
AddGeom(t1);
}
@@ -34,18 +35,18 @@
FontAtlas* font = GetFont("Univers128");
font->Bind(); {
- Text(0, oY, "{0123456789}", vec4(1.0,0.0,0.0,0.9), false );
+ Text(0, oY, "{0123456789}", Color::Float(1.0,0.0,0.0,0.9), false );
} font->Unbind();
font = GetFont("CMUSerifUprightItalic60");
font->Bind(); {
char s1[20];
sprintf(s1, "object space %.02f", oY);
- Text(0.0, oY, s1, vec4(1.0,1.0,1.0,0.8) );
+ Text(0.0, oY, s1, Color::Float(1.0,1.0,1.0,0.8) );
char s2[20];
sprintf(s2, "pixel space %d/%d", pX, pY);
- Text(pX, pY, s2, vec4(1.0,1.0,1.0,0.8), true );
+ Text(pX, pY, s2, Color::Float(1.0,1.0,1.0,0.8), true );
} font->Unbind();
@@ -54,7 +55,7 @@
pY = 1100;
}
- Text(GetFont("CMUSerifUprightItalic128"), 100, 100, "HEY!!!!!", vec4(0.0,0.0,1.0,1.0), true);
+ Text(GetFont("CMUSerifUprightItalic128"), 100, 100, "HEY!!!!!", Color::Float(0.0,0.0,1.0,1.0), true);
oY -= 0.01;

0 comments on commit 3d0d574

Please sign in to comment.