Pixmap and Blend modes.

BlitzMax Forums/BlitzMax Beginners Area/Pixmap and Blend modes.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

It came from this method:

Method CopyArea(MDest:Bitmap,MMode:Int=0,MColor:Int=$FFFFFFFF,MWidth:Int=0,MHeight:Int=0,MSourceX:Int=0,MSourceY:Int=0,MDestX:Int=0,MDestY:Int=0,MClip:Int=False)


and includes this at the top:

Local MRows:Int=MHeight-1 'How many rows to copy, clip at bottom of dest
Local MSourceRowBytes:Int=Width 'How many Int's in the source `Bitmap` per row
Local MDestRowBytes:Int=MDest.Width 'How many Int's in the dest `Bitmap` per row
Local MSourceXYSkip:Int=MSourceX+(MSourceY*MSourceRowBytes) 'How many bytes to skip vertically to get to top left of source area
Local MDestXYSkip:Int=MDestX+(MDestY*MDestRowBytes) 'How many bytes to skip vertically to get to top left of dest area
Local MSourceRowSkip:Int=Width-MWidth 'Skip amount in Int's, per row to account for Width difference in source
Local MDestRowSkip:Int=MDest.Width-MWidth 'Skip amount in Int's, per row to account for Width difference in dest
Local MRowBytes:Int=MWidth Shl 2 'Bytes per row to copy