Class: Wx::CompositionMode
- Defined in:
- lib/wx/doc/gen/graphics_object.rb,
lib/wx/doc/gen/graphics_context.rb
Overview
Compositing is done using Porter-Duff compositions (see keithp.com/~keithp/porterduff/p253-porter.pdf) with GraphicsContext#set_composition_mode.
The description give a short equation on how the values of a resulting pixel are calculated. R = Result, S = Source, D = Destination, colors premultiplied with alpha Ra, Sa, Da their alpha components
Constant Summary collapse
- COMPOSITION_INVALID =
Indicates invalid or unsupported composition mode.
Wx::CompositionMode.new(-1)
- COMPOSITION_CLEAR =
R = 0
Wx::CompositionMode.new(0)
- COMPOSITION_SOURCE =
R = S
Wx::CompositionMode.new(1)
- COMPOSITION_OVER =
R = S + D*(1 - Sa)
Wx::CompositionMode.new(2)
- COMPOSITION_IN =
R = S*Da
Wx::CompositionMode.new(3)
- COMPOSITION_OUT =
R = S*(1 - Da)
Wx::CompositionMode.new(4)
- COMPOSITION_ATOP =
R = SDa + D(1 - Sa)
Wx::CompositionMode.new(5)
- COMPOSITION_DEST =
R = D, essentially a noop
Wx::CompositionMode.new(6)
- COMPOSITION_DEST_OVER =
R = S*(1 - Da) + D
Wx::CompositionMode.new(7)
- COMPOSITION_DEST_IN =
R = D*Sa
Wx::CompositionMode.new(8)
- COMPOSITION_DEST_OUT =
R = D*(1 - Sa)
Wx::CompositionMode.new(9)
- COMPOSITION_DEST_ATOP =
R = S(1 - Da) + DSa
Wx::CompositionMode.new(10)
- COMPOSITION_XOR =
R = S(1 - Da) + D(1 - Sa)
Wx::CompositionMode.new(11)
- COMPOSITION_ADD =
R = S + D
Wx::CompositionMode.new(12)
- COMPOSITION_DIFF =
Result is the absolute value of the difference between the source and the destination.
Wx::CompositionMode.new(13)
Method Summary
Methods inherited from Enum
#!, #&, #<=>, [], #allbits?, #anybits?, #coerce, enumerators, #eql?, #initialize, #inspect, #integer?, #method_missing, #nobits?, non_distinct, #real?, set_non_distinct, #succ, #to_int, #to_s, #|, #~
Constructor Details
This class inherits a constructor from Wx::Enum
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Wx::Enum