diff options
| author | Tim Redfern <tim@eclectronics.org> | 2012-09-10 20:21:42 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2012-09-10 20:21:42 +0100 |
| commit | 4a43e83a3c4a43925a0a99ceba7a292a58bbccf0 (patch) | |
| tree | a1067b4eeb61e193b9e2e9e9e3da39716bb2d153 /liveengine/src/layers.cpp | |
| parent | 224f37374d4d4ac71ed41d8e8068c188daf699a7 (diff) | |
making it multiwindow
Diffstat (limited to 'liveengine/src/layers.cpp')
| -rw-r--r-- | liveengine/src/layers.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/liveengine/src/layers.cpp b/liveengine/src/layers.cpp index d2698ef..d7c7d77 100644 --- a/liveengine/src/layers.cpp +++ b/liveengine/src/layers.cpp @@ -8,7 +8,8 @@ svglayer::svglayer(string _f) load(_f);
}
-void svglayer::load(string _f){
+int svglayer::load(string _f){ + //check if files exits
svg.load(_f);
printf("%i paths\n",svg.getNumPath());
for (int i=0;i<svg.getNumPath();i++) { @@ -16,8 +17,11 @@ void svglayer::load(string _f){ strokes.push_back(svg.getPathAt(i).getStrokeColor());
printf(" path %i: fill %08x stroke %08x\n",i,svg.getPathAt(i).getFillColor().getHex(),svg.getPathAt(i).getStrokeColor().getHex());
} - xo=(ofGetWidth()-svg.getWidth())/2; - yo=(ofGetHeight()-svg.getHeight())/2;
+ if (svg.getNumPath()>0) { + xo=(ofGetWidth()-svg.getWidth())/2; + yo=(ofGetHeight()-svg.getHeight())/2; + } + isLoaded= (svg.getNumPath()>0);
}
void svglayer::draw(float a) {
|
