Class: TexPlay::EmptyImageStub
Overview
Used internally to create blank images (red/blue/green/alpha all 0) (TexPlay::create_image).
Credit to philomory for this class.
Instance Attribute Summary
Attributes inherited from ImageStub
Instance Method Summary collapse
-
#initialize(width, height) ⇒ EmptyImageStub
constructor
A new instance of EmptyImageStub.
Methods inherited from ImageStub
Constructor Details
#initialize(width, height) ⇒ EmptyImageStub
Returns a new instance of EmptyImageStub.
156 157 158 159 |
# File 'lib/texplay.rb', line 156 def initialize(width, height) raise ArgumentError if (width > TexPlay::TP_MAX_QUAD_SIZE || height > TexPlay::TP_MAX_QUAD_SIZE) super("\0" * (width * height * 4), width, height) end |