GalaevAlexey / core-plot

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

CPTImage lost alpha channel #558

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When using images with an alpha channel (e.g. png files) in CPTImage their 
alpha channels are composed to black. This applies to the 2.0 branch only.

Use code like this to reproduce:

    CPTImage *arrowImage = [CPTImage imageNamed: @"blue arrow"];
    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];

What is the expected output? What do you see instead?

See the attached image. The blue arrow is drawn properly but the black area 
around it is originally translucent.

What version of the product are you using? On what operating system?

OS 10.8, XCode 4.6.3, coreplot 2.0 latest revision.

Original issue reported on code.google.com by mike.lischke on 6 Aug 2013 at 7:58

Attachments:

GoogleCodeExporter commented 8 years ago
This is the image used for the part above.

Original comment by mike.lischke on 6 Aug 2013 at 7:59

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 11 Aug 2013 at 5:54

GoogleCodeExporter commented 8 years ago

Original comment by eskr...@mac.com on 11 Aug 2013 at 5:54

GoogleCodeExporter commented 8 years ago
This issue was closed by revision cc5450fe1085.

Original comment by eskr...@mac.com on 11 Aug 2013 at 8:24