Closed GoogleCodeExporter closed 9 years ago
Original comment by eskr...@mac.com
on 6 Jan 2013 at 7:28
Original comment by eskr...@mac.com
on 1 Feb 2013 at 1:43
After further research, this feature will have to wait until Core Plot supports
a Mac OS X 10.6 deployment target (see issue 512). NSImage added some methods
in 10.6 that will make implementation much easier and more efficient.
Original comment by eskr...@mac.com
on 24 Feb 2013 at 5:20
Original comment by eskr...@mac.com
on 24 May 2013 at 6:29
This issue was closed by revision 6c8d55cd3a7e.
Original comment by eskr...@mac.com
on 25 May 2013 at 12:42
I don't think the solution is correct. It looks like only the scale factor is
automatically adjusted, but not as if the @2x image would be loaded. Look at
the screenshots below.
Original comment by mike.lischke
on 25 May 2013 at 5:18
Attachments:
The first image uses a normal resolution, the second one the retina hires.
Original comment by mike.lischke
on 25 May 2013 at 5:19
Original comment by eskr...@mac.com
on 25 May 2013 at 9:01
What method did you use to load the image? I added an +imageNamed: method that
should work.
Original comment by eskr...@mac.com
on 25 May 2013 at 10:18
That's the code I use to load the image and set up the annotation layer:
CPTImage *arrowImage = [CPTImage imageForPNGFile: [[NSBundle mainBundle] pathForResource: @"blue arrow" ofType: @"png"]];
earningsArrowAnnotation = [[CPTLayerAnnotation alloc] initWithAnchorLayer: x1.axisTitle.contentLayer];
earningsArrowAnnotation.rectAnchor = CPTRectAnchorTopLeft;
earningsArrowAnnotation.displacement = CGPointMake(-15, -50);
CPTBorderedLayer *layer = [[CPTBorderedLayer alloc] initWithFrame: CGRectMake(0, 0, 24, 27)];
layer.fill = [CPTFill fillWithImage: arrowImage];
earningsArrowAnnotation.contentLayer = layer;
[earningsMiniPlot addAnnotation: earningsArrowAnnotation];
Original comment by mike.lischke
on 26 May 2013 at 8:32
I see, using imageNamed: the display is correct. So your fix seems to work as
expected. It might better to deprecate the old API to make the transition more
obvious.
Original comment by mike.lischke
on 26 May 2013 at 8:43
+imageForPNGFile: and -initForPNGFile: should still work on iOS. I'll see if I
can fix them on Mac.
Original comment by eskr...@mac.com
on 26 May 2013 at 12:10
This issue was closed by revision d226040c9929.
Original comment by eskr...@mac.com
on 7 Jun 2013 at 12:34
I added + imageWithContentsOfFile: and -initWithContentsOfFile: methods to
CPTImage. You can use these when Xcode combines your PNG files into a
multi-part TIFF. +imageNamed: also works.
Original comment by eskr...@mac.com
on 7 Jun 2013 at 12:38
Original issue reported on code.google.com by
mike.lischke
on 6 Jan 2013 at 6:44