#include <SkPixelXorXfermode.h>
Inherits SkXfermode.
Public Member Functions | |
SkPixelXorXfermode (SkColor opColor) | |
virtual Factory | getFactory () |
virtual void | flatten (SkFlattenableWriteBuffer &) |
Protected Member Functions | |
virtual SkPMColor | xferColor (SkPMColor src, SkPMColor dst) |
SkPixelXorXfermode implements a simple pixel xor (op ^ src ^ dst). This transformation does not follow premultiplied conventions, therefore this proc *always* returns an opaque color (alpha == 255). Thus it is not really usefull for operating on blended colors.
Definition at line 27 of file SkPixelXorXfermode.h.
SkPixelXorXfermode::SkPixelXorXfermode | ( | SkColor | opColor | ) | [inline] |
Definition at line 29 of file SkPixelXorXfermode.h.
virtual void SkPixelXorXfermode::flatten | ( | SkFlattenableWriteBuffer & | ) | [virtual] |
Override this to write data specific to your subclass into the buffer, being sure to call your super-class' version first. This data will later be passed to your Factory function, returned by getFactory().
Reimplemented from SkFlattenable.
virtual Factory SkPixelXorXfermode::getFactory | ( | ) | [virtual] |
Implement this to return a factory function pointer that can be called to recreate your class given a buffer (previously written to by your override of flatten().
Implements SkFlattenable.
virtual SkPMColor SkPixelXorXfermode::xferColor | ( | SkPMColor | src, | |
SkPMColor | dst | |||
) | [protected, virtual] |
The default implementation of xfer32/xfer16/xferA8 in turn call this method, 1 color at a time (upscaled to a SkPMColor). The default implmentation of this method just returns dst. If performance is important, your subclass should override xfer32/xfer16/xferA8 directly.
This method will not be called directly by the client, so it need not be implemented if your subclass has overridden xfer32/xfer16/xferA8
Reimplemented from SkXfermode.