code

Sierpinski Triangle case study – setting pixels with bitmap data

Sunday, August 8th, 2010

Continuing on this random trend, from chaos comes order as we start to approach blitting with bitmap data. Chaos Theory is a good corollary to the philosophy of the Blitting SDK. By defining the behavior of systems, we can obtain an expected result with some threshold unique to each instance. To model this, a case [...]

Tags: , , ,

RGB color palette

Friday, July 30th, 2010

For reference, source of Blitting’s ColorPalette class:

Tags: , , ,

RGB color palette study

Friday, July 30th, 2010

Let’s add color and combine a RGB color study. Blitting features a convenient ColorPalette class which contains an integer (hex) enumeration of default X11 RGB X colors. Each color name is defined as a String with a list of all possible colors available via the Colors static member: 1 2 3 import com.jasonsturges.labs.blitting.color.ColorPalette;   var [...]

Tags: , , , ,

Extending RandomTimer – FunctionTimer

Friday, July 30th, 2010

Extending RandomTimer is easy, with a handler for onTimerEvent built in. Let’s try an example – FunctionTimer, a class that inherits RandomTimer (therefore inheriting flash.utils.Timer) which maintains a collection of function pointers. At random intervals, all functions within the Vector of Functions is executed. Example class: FunctionTimer 1 2 3 4 5 6 7 8 [...]

Tags: , , , ,

Random Timer

Friday, July 30th, 2010

Using the pattern demonstrated by RandomText, let’s implement Blitting’s randomized timer class RandomTimer. Inheriting from flash.utils.Timer, RandomTimer dispatches TimerEvent.TIMER and TimerEvent.TIMER_COMPLETE at random delays. Example implementation: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 [...]

Tags: , , , ,

Random Text

Thursday, July 29th, 2010

Blitting offers many random generation routines. Let’s start with an example implementation of Blitting’s RandomText: 1 2 3 import com.jasonsturges.labs.blitting.text.RandomText;   var char:String = RandomText.character(); Above, a random character is generated and returned as a String. Four character sets are native: Upper Case Alphabet Lower Case Alphabet Numbers Symbols These sets represent two things: Individual [...]

Tags: , , ,

hello world!

Tuesday, July 27th, 2010

0100100101110100 0010011101110011 0010000001100001 0010000001100010 0110010101100001 0111010101110100 0110100101100110 0111010101101100 0010000001100100 0110000101111001 0010000001101001 0110111000100000 0111010001101000 0110100101110011 0010000001101110 0110010101101001 0110011101101000 0110001001101111 0111001001101000 0110111101101111 0110010000101100 0010000000001101 0000101001000001 0010000001100010 0110010101100001 0111010101110100 0110100101100110 0111010101101100 0010000001100100 0110000101111001 0010000001100110 0110111101110010 0010000001100001 0010000001101110 0110010101101001 0110011101101000 0110001001101111 0111001000101100 0010000000001101 0000101001010111 0110111101110101 0110110001100100 0010000001111001 0110111101110101 0010000001100010 0110010100100000 0110110101101001 0110111001100101 0011111100100000 0000110100001010 0100001101101111 0111010101101100 0110010000100000 0111100101101111 0111010100100000 [...]

Tags: