PorterduffXfermode: Clear a section of a bitmap

前端 未结 3 1385
北恋
北恋 2020-12-02 20:36

The goal is to draw a bitmap and over the top of something, and draw shapes that ERASE the underlying area of the bitmap.

I have a proof of concept to try and underst

3条回答
  •  攒了一身酷
    2020-12-02 21:21

    I don't see anything unexpected. In the particular case of Mode.CLEAR, both the color and alpha of the destination are cleared, which allows the black background to show. This utility allows one to experiment with various modes, colors and alpha values, and the source may offer some insight. In the (somewhat dated) image below, the CLEAR areas reveal the faint pinstripe-gray provided by the platform's PanelUI delegate.


    (source: Composite at sites.google.com)

提交回复
热议问题