SVG Drawing in iphone - iphone

Hope all of you folk will fine and doing there best. i have just started iphone app development this april.
I want to draw svg on CGContext in iphone just like in android we can do.
kindly follow the link for android SVG drawing Libraries.
SVG on Android
Lib No 1
My requirment,I just want to draw SVG on iphone CGContext for that i need any third party library. if any body have useful and exact information kindly help me out.
How to draw SVG in iPhone?
Thanks in advance.
mark Gjel.

If the SVG is fixed, you could try Qwarkee which will generate a -drawRect: implementation which draws the equivalent SVG using just quartz functions.
The current version works best with Illustrator generated SVG files, but the developers tell me an update is coming in the next few days which will make the app work with a larger variety of files.

not the perfect match for your question but check out SVGKit
SVGKit is a cross-platform Cocoa framework for rendering SVG files as
Core Animation layers. All shapes are represented by instances of the
CAShapeLayer class, and are, by design, animatable. SVGKit is
compatible with the latest OS X and iOS SDK's.

SVGgh has an SVGRenderer class which can draw into a CGContextRef, so you can use it to print, generate a PDF or draw to a UIView or CALayer.

Related

Quartz Composer in iOS

I am new to iOS platform. Is there anyway I can use quartz composer library embedded into my iPhone app? e.g I would like to get RGBA from a particular pixel from an image (UIImage) using IMAGE PIXEL. get-color-image-pixel
OR can i use existing framework in xcode4 to achieve above scenario??? thanks
No, the Quartz Composer framework does not exist on iOS.
To extract pixel color data from a UIImage, see this question: How to get pixel data from a UIImage (Cocoa Touch) or CGImage (Core Graphics)?
Have a see Quartz Composer for iOS. That runtime implementation for iOS. This project makes it possible to load, display and interact with .qtz files on iOS.
Good luck

Which are vector graphics based image format supported by iphone?

I have developed one game for iphone which uses png images.It works well but which are the vector graphics images supported by iphone that i can use for my game for better quality of image like when we zoom the image the image displayed properly.which are the most common image formats that are widely used by iphone game developers?
I saw this on github a while back. It claims to render SVGs to Core Image layers. I've never used it, but I know it exists.
The only vector graphics format that is directly supported on iOS is PDF (not counting UIWebView, which also supports SVG).
Vector graphics are not typically used in games, because they're much slower to render, but that depends on what type of game you're developing. I would consider using multiple versions of bitmap images with different resolutions for zooming.

Advice on using vector graphics on the iPhone

A question for the seasoned iPhone developers, what is your preference for graphics in an iPhone app? I have turned to PNGs because I read that is the preferred image format and they are the most efficient format for the OS in terms of performance. However I had read you should try to use svg graphics so they scale up on the iPad. I started reading up on svg for my next app and thought the format was natively supported by UIImageView, but it seems you can only render them in UIWebviews or programatically. My belief was a lot of the latest graphically-rich apps used svg graphics, is that an incorrect assumption?
Thanks for any advice/comments.
I think using SVG graphics would cause a ton of problems and I'm not aware of any apps that use it. It's probably a much better idea to use PNGs and just have different sizes for iPhone, iPhone 4 and iPad.

Editor for 2D graphical elements in iPhone App

I am going to be working with a graphic designer to develop an interactive children's iphone app. It will not be a game as such, but rather a series of backgrounds with some interactive objects that can be touched to display simple animation or sound.
These I would be striving for the quality that these guys produce http://duckduckmoosedesign.com/
I assume that they would be using Quartz2D rather than embedded jpegs for their design elements?
I was wondering what tools people would recommend for designers to use that can then be imported for use an iPhone app.
I have seen some references to creating SVG in Inkscape but was wondering whether there was any other alternatives for importing graphics into Quartz for use in an iPhone app?
Opacity is a design app, that is capable to output quartzCore source code suitable for iphone or mac.

What image libraries have been ported to the iPhone?

I am researching iPhone image libraries. I am looking for a lightweight image library that will compile on an iPhone. Have any libraries such as ImageMagick been ported? What image libraries would be best suited for the iPhone?
The image library should be suited to do black & white, sepia tone, saturation filters, and more sophisticated effects such as oil painting, etc.
Thank you in advance.
The iPhone SDK comes with a very good image library, Core Graphics. From the SDK Documentation:
The Core Graphics framework is a
C-based API that provides low-level,
lightweight 2D rendering with superb
output fidelity. Use this framework,
which is based on the Quartz drawing
engine, for path-based drawing,
anti-aliased rendering, gradients,
images, color management,
coordinate-space transformations, and
PDF document handling.
Check Out: http://developer.apple.com/iphone/library/navigation/Topics/GraphicsAnimation/index.html
And :http://developer.apple.com/iphone/library/navigation/Frameworks/Media/CoreGraphics/index.html
(Login required for both).
But Core Graphic won't do any of image filtering mention above. That's a part of Core Image, which is apparently missing from iPhone SDK.
I believe there has been some success porting ImageMagick it to iOS:
http://www.imagemagick.org/discourse-server/viewtopic.php?f=4&t=14089