class Roglew::Gdi32::PIXELFORMATDESCRIPTOR

Constants

FLAGS_INV

Public Class Methods

new() click to toggle source

undef_method :nSize=

Calls superclass method
# File lib/roglew/platform/windows/gdi32.rb, line 150
def initialize
        super
        self[:nSize] = self.size
end

Public Instance Methods

dwFlags() click to toggle source
# File lib/roglew/platform/windows/gdi32.rb, line 155
def dwFlags
        val = self[:dwFlags]
        Set.new(FLAGS_INV.select { |k,_| val & k != 0 }.reduce([]) {|a,(_,v)| a << v}.flatten)
end
dwFlags=(flags) click to toggle source
# File lib/roglew/platform/windows/gdi32.rb, line 160
def dwFlags=(flags)
        self[:dwFlags] = [*flags].reduce(0) {|a,f| a | PFDFlags[f].to_i}
end
to_s() click to toggle source
# File lib/roglew/platform/windows/gdi32.rb, line 164
def to_s
        [:iPixelType, :cColorBits, :cAccumBits, :cDepthBits, :iLayerType, :dwFlags].map{|n| "#{n} = #{send(n).inspect}"}.join(', ')
end