Giter Site home page Giter Site logo

asciimage's People

Contributors

cparnot avatar esttorhe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

asciimage's Issues

Support for Apple Watch

I started using ASCIIImage with some Apple Watch code and noticed that the automatic scaling done by the current code will be done based on the current device scale, which can be wrong if running in the watch extension. For instance, if running on iPhone 6+, you'll get a 3x image, when you actually need 2x.

There are methods normally exposed only for tests that have a scaleFactor parameter that can be used as a workaround, but the naming can be confusing and there is the issue #1 that needs to be taking into account.

ASCIIImage as Xcode plugin, with Monodraw

It would be wonderful to have ASCIImage as an Xcode plug-in, perhaps utilising Monodraw - http://monodraw.helftone.com

So a user could:
• hit a key-combo
• draw image
• hit return
• have a ASCIIImage method written, with perfect iOS 8 style lines

mono-ascii

The endless tyranny of relying on designers and photoshop would be finished. The dawn bell would mark the hour of liberation, and the soothing light of justice would flood over the horizon. In the far future, when our own humble sun explodes, and when giant spaceships send our descendants into space to populate the universe, they will carry with them the memory of when ASCIIImage was made into an Xcode plugin. Something like that anyway.

Implementation-independent context/path metadata?

The aim of this issue is to get the discussion started on a point that, I think we all agree, would be pretty useful: finding some implementation-independent method to define context/path metadata (i.e. both default and per-path overrides of fill color, stroke color and stroke width, aliasing/anti-aliasing, and open/closed path choices).

A possibility would be a JSON or YAML snippet holding a simple map having keys default, element0, ... elementN (or something similar), and with values maps of the properties to their values.

This does have the downside that more sophisticated selections (e.g. "if index is less than 2 or higher than 16") are not possible; a solution would be to allow keys in the hash to be arrays or ranges or something similar.

Create pixel-aligned Bezier curves for ellipses as well

At the moment, Bezier paths created for ellipses are sized so that filling them gets all the way to the pixel borders. As a result, when using stroke for drawing, they are not pixel-aligned like all the other shapes. The rect for ellipses simply need to be inset 0.5 points. When rendered as pure fill, we need to issue a fill and a stroke, just like for polygons.

From text file

Might be useful, if same image needs to be used in several source files.

+ (PARImage *)imageWithASCIITextFile:(NSString *)textFile color:(PARColor *)color shouldAntialias:(BOOL)shouldAntialias {
    NSString *type = @"txt";
    NSString *separation = @"\n";
    NSString *fileText = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:textFile ofType:type] encoding:NSUTF8StringEncoding error:nil];
    NSArray *rep = [[NSArray alloc] initWithArray:[fileText componentsSeparatedByString:separation]];
    return [self imageWithASCIIRepresentation:rep contextHandler:[self contextHandlerForImageWithColor:color shouldAntialias:shouldAntialias]];
}

asciitextfile

Have way to specifying subpaths

Paths need not be contiguous and having composite paths are necessary to have shapes with holes in them. Personally, I think all paths in one ASCII representation should be part of one path and you would use multiple paths/representations for separate shapes. But if you want to work it all into a single rep then that's your choice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.