Bitmap knobs strange scaling/fuzziness
Posted: Wed Nov 12, 2014 4:58 pm
Hi.
Hoping one of you gurus can help.
Just trying out Flowstone - downloaded it yesterday. I like the potential I'm seeing so far, and was close to buying it, but having some bother with bitmap-blitted knobs.
I have 31 of, 64x64 knob pics made in a vertically joined, rotating, sequence made with Knobman. They look fine in gfx package, and fine if I draw the whole thing statically in Flowstone (i.e. the long strip).
when I load them in as a bitmap, I then use the following to attempt to make a rotating knob:
knobNumPics = 31
knobHeight = ( (@picKnob.height/knobNumPics)).to_int
knobHeight = 64
cell = ((knobNumPics - 0.45 ) * @meterVal ).to_int
srcRect = [0,bmpVertStart,64, 64 ]
output 1, cell
v.drawBitmapSection @picKnob, srcRect,[0,0, 20, 20 ]
This works, in that a fuzzy version of the knob is drawn, and does rotate as expected, but (seemingly) due to the stupid grid-based scaling of srcRect/drawBitmapSection compared with drawBitmap, the pixel-to-pixel mapping I was expecting is lost.
Is this just a (severe) limitation or is there something I've misunderstood? (hoping the latter).
I guess I could load in 31 separate bitmaps (groan) and make it work that way.
What is it with this grid-based scaling thing and why is it there? Just seems silly when dealing with bitmaps.
Many thanks in advance
n.
Hoping one of you gurus can help.
Just trying out Flowstone - downloaded it yesterday. I like the potential I'm seeing so far, and was close to buying it, but having some bother with bitmap-blitted knobs.
I have 31 of, 64x64 knob pics made in a vertically joined, rotating, sequence made with Knobman. They look fine in gfx package, and fine if I draw the whole thing statically in Flowstone (i.e. the long strip).
when I load them in as a bitmap, I then use the following to attempt to make a rotating knob:
knobNumPics = 31
knobHeight = ( (@picKnob.height/knobNumPics)).to_int
knobHeight = 64
cell = ((knobNumPics - 0.45 ) * @meterVal ).to_int
srcRect = [0,bmpVertStart,64, 64 ]
output 1, cell
v.drawBitmapSection @picKnob, srcRect,[0,0, 20, 20 ]
This works, in that a fuzzy version of the knob is drawn, and does rotate as expected, but (seemingly) due to the stupid grid-based scaling of srcRect/drawBitmapSection compared with drawBitmap, the pixel-to-pixel mapping I was expecting is lost.
Is this just a (severe) limitation or is there something I've misunderstood? (hoping the latter).
I guess I could load in 31 separate bitmaps (groan) and make it work that way.
What is it with this grid-based scaling thing and why is it there? Just seems silly when dealing with bitmaps.
Many thanks in advance
n.