Vector Graphics #121

Closed
avaidyam opened this Issue Jun 30, 2012 · 9 comments

3 participants

@avaidyam

In my private fork of TwUI, I've been working around the resolution mess by doing something with vector pdf files. Right now, i can either supply an @2x image or a vector PDF which auto-scales to any scale factor. I suggest we do this with TwUI too. Apple may be going bitmaps FTW, but TwUI is a framework for the future. Vector images are for the future (read up on Matt Gemell's post on this, he explains the advantages) and I believe we need to adopt this soon.

@joshaber
Twitter, Inc. member

PRs are always welcome :)

@avaidyam

Oh, but it would be an extremely large change that might interrupt the workflow of others, so I think it'd be better to ask around first. -And the Core Layout one is ready.

@joshaber
Twitter, Inc. member

It seems like it'd be pretty centralized to TUIImage, right?

I'll be honest, I'm not sure I see the dire need but I wouldn't be opposed to it for those who'd prefer vector assets.

@avaidyam

Yeah, the core is built into TUIImage, but I've built it for ease-of-use into all the buttons and controls and whatnot. I could just PR for the TUIImage that supports vectors, and I guess that could work for now?

I just think it's a LOT easier than going bitmap mode with @2x pngs and all.

@atebits

I'm no fan of these bloated @2x pngs, but vectors have downsides also. Loading and drawing is slower, and you have to be very careful about landing on half pixels. Designers also need to use a different workflow to generate assets. Think it's awesome to support, as long as people who use it know the tradeoffs.

@avaidyam

Alright then, I'll strip it down into a TUIImage category, and TwUI developers can use if it they wish. @joshaber Core Layout is pretty much ready too - i've fixed the bugs and removed the comment block.

@joshaber
Twitter, Inc. member

It's also worth nothing that in Mac OS X land, Retina support is typically done with multirepresentational TIFFs. Xcode squashes @2x images down into a TIFF by default. Supporting that, in my mind, is much more important than vector support.

@avaidyam

Whoah, I think I may have just overlooked all of that. Xcode 4.3 even asks me if I want to do that. How did I not notice? Interesting, I think after Core Layout's done, i'll be patching in multi-rep TIFF (I'll check this out very shortly) and PDF/AI support (Yeah, drag and drop illustrator files work!).

@avaidyam

Pushed to my fork, and it should show up in the yet-un-pulled pull request. I'm still looking into TIFF support, so if someone could link me as to where this is mentioned, I'd be glad to add support for it.

@avaidyam avaidyam closed this Jul 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment