gujjula / core-plot

Automatically exported from code.google.com/p/core-plot
0 stars 0 forks source link

update CPTImage and CPTFill to handle @2x images automatically #315

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
- The following code displays pixellated symbols on iPhone 4:

        plotSymbol = [CPTPlotSymbol ellipsePlotSymbol];
        plotSymbol.lineStyle = nil;
        plotSymbol.size = CGSizeMake(32, 32);
        plotSymbol.fill = [CPTFill fillWithImage:[[CPTImage alloc] initForPNGFile:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"somePlotSymbolImage"] ofType:@"png"]]];

- Workaround:

        NSString *resourceName = @"somePlotSymbolImage";
        if ([[UIScreen mainScreen] scale] == 2.0) resourceName = @"somePlotSymbolImage@2x";
        plotSymbol.fill = [CPTFill fillWithImage:[[CPTImage alloc] initForPNGFile:[[NSBundle mainBundle] pathForResource:resourceName ofType:@"png"]]];

- Enhancement request:

handle @2x images automatically in this scenario.

Original issue reported on code.google.com by klemob...@gmail.com on 13 Aug 2011 at 9:57

GoogleCodeExporter commented 9 years ago

Original comment by eskr...@mac.com on 14 Aug 2011 at 12:16

GoogleCodeExporter commented 9 years ago

Original comment by eskr...@mac.com on 16 Aug 2011 at 10:55

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 9de3df0ff7ee.

Original comment by eskr...@mac.com on 23 Aug 2011 at 1:42