If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
bitmap crop, loop (like css borderimage)
2 posts
• Page 1 of 1
bitmap crop, loop (like css borderimage)
I have so many projects...
Right now i'd like to get a grab on a flowstone ruby expression dictionnary and browse around so i could find how to crop a bitmap
I want to use a bitmap that has 3 areas, left side, center (stretch) and right side.. To make buttons and gui parts.
It could really be useful to planify in advance to include optionnal 9 areas setup for further uses . {top left, bottom-right, center, side-left (...)}
Also, alternatively, loop instead of stretch could be useful.
Even then, it could be mixed with @cells like the /on/off/ switches that uses this code function... Could allow the animation of a button that uses that "css-borderimage-like" code... :3
Right now, that's the only code that i've got and am lacking of knowledge as i am a slow learner that works more instinctively than in any organised way (my bad)...
I could end up with some results with primitives but it'd probably be 3times too much heavy
I'd also like to know how i could make a simple rotate code like the primitive rotate view module...
Well... I'd love to have Ruby alternatives for all processes from simple multiply to text formatting and stuff It's so hard to get informations about Flowstone's ruby or anything flowstone, synthmaker or dsprobotics
I am really close to achieve a software synthetizer that really is /OH-MY-GOD!/ but it's getting rough so before i try to make money with it (how does it work, legally? are there online stores on which i could display? how to make secure transactions?) When i'll be able to make marketable versions, i'll buy flowstone with yearly renew enabled
Where could i study flowstone like in college or something?
Right now i'd like to get a grab on a flowstone ruby expression dictionnary and browse around so i could find how to crop a bitmap
I want to use a bitmap that has 3 areas, left side, center (stretch) and right side.. To make buttons and gui parts.
It could really be useful to planify in advance to include optionnal 9 areas setup for further uses . {top left, bottom-right, center, side-left (...)}
Also, alternatively, loop instead of stretch could be useful.
Even then, it could be mixed with @cells like the /on/off/ switches that uses this code function... Could allow the animation of a button that uses that "css-borderimage-like" code... :3
Right now, that's the only code that i've got and am lacking of knowledge as i am a slow learner that works more instinctively than in any organised way (my bad)...
- Code: Select all
def draw v
v.drawBitmap @bitmap,[0,0,v.width,v.height]
end
def event i,v
redraw 0
end
I could end up with some results with primitives but it'd probably be 3times too much heavy
I'd also like to know how i could make a simple rotate code like the primitive rotate view module...
Well... I'd love to have Ruby alternatives for all processes from simple multiply to text formatting and stuff It's so hard to get informations about Flowstone's ruby or anything flowstone, synthmaker or dsprobotics
I am really close to achieve a software synthetizer that really is /OH-MY-GOD!/ but it's getting rough so before i try to make money with it (how does it work, legally? are there online stores on which i could display? how to make secure transactions?) When i'll be able to make marketable versions, i'll buy flowstone with yearly renew enabled
Where could i study flowstone like in college or something?
- NightmareDream
- Posts: 2
- Joined: Mon Dec 20, 2010 11:58 pm
Re: bitmap crop, loop (like css borderimage)
Have a look into the code for the Bitmap Knobs in the Toolbox. It demonstrates how to display "stitched" Bitmaps. For a complete code reference look in the Ruby section of the user guide:
viewforum.php?f=23
For your problem you'll should take a look at this function:
You can't rotate a view with Ruby. But you can do the rotation yourself, for all the parts you gonna draw in Ruby. That's basically just basic Math. You can take a look at the "rotatePoint" Method in the Knobs code. This is used to rotate a point around a center point. You can also rotate a bitmap using the "drawBitmapSection" method that I mentioned above.
viewforum.php?f=23
For your problem you'll should take a look at this function:
- Code: Select all
drawBitmapSection bitmap, source, position [, alpha, rotation, origin]
NightmareDream wrote:I'd also like to know how i could make a simple rotate code like the primitive rotate view module...
You can't rotate a view with Ruby. But you can do the rotation yourself, for all the parts you gonna draw in Ruby. That's basically just basic Math. You can take a look at the "rotatePoint" Method in the Knobs code. This is used to rotate a point around a center point. You can also rotate a bitmap using the "drawBitmapSection" method that I mentioned above.
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 65 guests