SVG Loader Extension

  ... the SVG Extension for AndEngine.

Re: SVG Loader Extension

Postby Maramak » Tue Aug 02, 2011 1:44 pm

Hi! Can someone tell me, where I can find any description for org.anddev.andengine.extension.svg.util.constants.SVGConstants class constants, please?
Maramak
 
Posts: 1
Joined: Wed Jul 20, 2011 11:36 am

Re: SVG Loader Extension

Postby Taren » Tue Aug 23, 2011 8:35 pm

If anyone is still intrested in this i motified his code to work with the latest andengine

to install it(its not compiled to a jar....i just add the source to my project) just make a package called org.svg in your src folder and drag the contents of svg(not the svg folder) to the newly created package
Attachments
SVGLoader.zip
(34.42 KiB) Downloaded 194 times
Taren
 
Posts: 6
Joined: Mon Aug 22, 2011 1:15 am

Re: SVG Loader Extension

Postby rkpost » Wed Aug 24, 2011 5:04 pm

Thank you Taren. Next weekend I'll play with this extension.
rkpost
 
Posts: 201
Joined: Tue Sep 14, 2010 5:52 am
Location: Buenos Aires

Re: SVG Loader Extension

Postby Taren » Thu Sep 01, 2011 1:05 am

I found a bug with removing the SVGDoc(at least with my updated version posted above). Its a easy fix just go into SVGdoc.java and find the removeShape method and replace it with this:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public void removeShape(Shape pShape){
  2.                 this.detachChild(pShape);
  3.         }
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
Taren
 
Posts: 6
Joined: Mon Aug 22, 2011 1:15 am

Re: SVG Loader Extension

Postby eric » Fri Sep 02, 2011 3:26 am

Hey I finaly made a update to atlas texture version.
http://www.andengine.org/forums/post21849.html#p21849
eric
 
Posts: 44
Joined: Wed Feb 16, 2011 9:53 pm

Re: SVG Loader Extension

Postby pep_dj » Tue Nov 08, 2011 10:02 am

eric wrote:Hey I finaly made a update to atlas texture version.
http://www.andengine.org/forums/post21849.html#p21849


Thanks for it! :)
Image
pep_dj
 
Posts: 170
Joined: Fri Nov 12, 2010 9:05 pm

Re: SVG Loader Extension

Postby nt4t » Mon Dec 12, 2011 10:09 am

Please help me use onAreaTouched with svgloader.
I try this code, but no debug output :(

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. final Rectangle toucharea = new Rectangle(0, 0, 90, 300){
  2.             @Override
  3.             public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {
  4.                     this.setPosition(pSceneTouchEvent.getX() - this.getWidth() / 2, pSceneTouchEvent.getY() - this.getHeight() / 2);
  5.                    
  6.                     final String TAG = "test";
  7.                                 Log.v(TAG, "touch:");
  8.  
  9.                     return true;
  10.             }
  11.         };
  12.  
  13.  
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
nt4t
 
Posts: 4
Joined: Mon Dec 12, 2011 9:38 am

Re: SVG Loader Extension

Postby Giszmo » Mon Dec 12, 2011 5:10 pm

Hi nt4t,

you are absolutely off topic here. Your problem has nothing to do with svgloader and google would have helped you quickly.
Code: Select all
scene.registerTouchArea(toucharea);
layer.attachChild(toucharea);


(You bumped 20 people watching this topic for a 10s google search.)
FluxCards allows you to learn 20 words per day with only 15 minutes repeating per day. Try it out. It's free and amazing ;)
Image Image
Giszmo
 
Posts: 113
Joined: Thu Mar 03, 2011 11:07 pm

Re: SVG Loader Extension

Postby nt4t » Tue Dec 13, 2011 3:14 am

Giszmo wrote:Hi nt4t,

you are absolutely off topic here. Your problem has nothing to do with svgloader and google would have helped you quickly.
Code: Select all
scene.registerTouchArea(toucharea);
layer.attachChild(toucharea);


(You bumped 20 people watching this topic for a 10s google search.)



Thanks.

this.mSVGScene.registerTouchArea(toucharea);
this.mSVGScene.attachChild(toucharea);

works for me. Sorry for offtopic.

But about Svgloader:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. this.mSVGDoc.removeBody(this.mSVGDoc.getElement("Rect").getBody());
Parsed in 0.035 seconds, using GeSHi 1.0.8.4


works perfect, but

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. this.mSVGDoc.removeShape(this.mSVGDoc.getElement("Rect").getShape());
Parsed in 0.036 seconds, using GeSHi 1.0.8.4


crashed

Syntax: [ Download ] [ Hide ]
Using c Syntax Highlighting
  1. E/AndroidRuntime(  786): FATAL EXCEPTION: main
  2. E/AndroidRuntime(  786): java.lang.NullPointerException
  3. E/AndroidRuntime(  786):        at org.anddev.andengine.extension.svg.SVGDoc.removeShape(SVGDoc.java:122)
  4. E/AndroidRuntime(  786):        at de.ericdepta.andengine.svg.SVGLoaderExamplesActivity.onLoadSVG(SVGLoaderExamplesActivity.java:244)
  5. E/AndroidRuntime(  786):        at de.ericdepta.andengine.svg.SVGLoaderExamplesActivity.loadSVG(SVGLoaderExamplesActivity.java:198)
  6. E/AndroidRuntime(  786):        at de.ericdepta.andengine.svg.SVGLoaderExamplesActivity.onLoadScene(SVGLoaderExamplesActivity.java:124)
  7. E/AndroidRuntime(  786):        at org.anddev.andengine.ui.activity.BaseGameActivity.doResume(BaseGameActivity.java:169)
  8. E/AndroidRuntime(  786):        at org.anddev.andengine.ui.activity.BaseGameActivity.onWindowFocusChanged(BaseGameActivity.java:85)
  9. E/AndroidRuntime(  786):        at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2001)
  10. E/AndroidRuntime(  786):        at android.view.View.dispatchWindowFocusChanged(View.java:3924)
  11. E/AndroidRuntime(  786):        at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:659)
  12. E/AndroidRuntime(  786):        at android.view.ViewRoot.handleMessage(ViewRoot.java:1968)
  13. E/AndroidRuntime(  786):        at android.os.Handler.dispatchMessage(Handler.java:99)
  14. E/AndroidRuntime(  786):        at android.os.Looper.loop(Looper.java:123)
  15. E/AndroidRuntime(  786):        at android.app.ActivityThread.main(ActivityThread.java:3683)
  16. E/AndroidRuntime(  786):        at java.lang.reflect.Method.invokeNative(Native Method)
  17. E/AndroidRuntime(  786):        at java.lang.reflect.Method.invoke(Method.java:507)
  18. E/AndroidRuntime(  786):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
  19. E/AndroidRuntime(  786):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  20. E/AndroidRuntime(  786):        at dalvik.system.NativeStart.main(Native Method)
  21.  
Parsed in 0.010 seconds, using GeSHi 1.0.8.4
nt4t
 
Posts: 4
Joined: Mon Dec 12, 2011 9:38 am

Re: SVG Loader Extension

Postby fanno » Sun Feb 26, 2012 4:44 pm

how to use http://code.google.com/p/andenginesvgex ... apeplugin/ ?

I cant figure out how or find any info on it.

-Thanks
fanno
 
Posts: 3
Joined: Sun Feb 05, 2012 10:50 pm

PreviousNext

Return to SVG

Who is online

Users browsing this forum: No registered users and 2 guests