ArrayArrayArrayArrayArrayArray BrainModular BrainModular Users Forum 2024-01-15T11:36:24+02:00 https://www.brainmodular.com/forums/app.php/feed/topic/7210 2024-01-15T11:36:24+02:00 2024-01-15T11:36:24+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45193#p45193 <![CDATA[Re: Paint Image/Frame]]> It could take an array on ARGB (or RGBA on macOS?) pixels and just blit it into the canvas?

Statistics: Posted by senso — 15 Jan 2024, 10:36


]]>
2024-01-11T15:17:16+02:00 2024-01-11T15:17:16+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45184#p45184 <![CDATA[Re: Paint Image/Frame]]> i spend shittons of time optimizing such things in juce i might be biased.. always cache paths/buffers ect
still think some basic still frames manipulation kit could be nice, like load an image, jpg/png to usine frame format,
ideally save some buffer to them, beeing able to simply repaint a stored frame in paint proc even on 'normal' modules would be nice.
maybe just some strecth to fit rect transorm that would be more efficient than looping thru each pixels. atm i don't think man can really paint an image unless im mistaken

Statistics: Posted by 23fx23 — 11 Jan 2024, 14:17


]]>
2024-01-10T22:24:04+02:00 2024-01-10T22:24:04+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45180#p45180 <![CDATA[Re: Paint Image/Frame]]> I wrote a user module that draws a full 88 note keyboard with highlighted keys. Every key with a load of draw paths, fills, etc. The idea that I would have to redraw all that whenever Usine requested seemed like a disaster.
In practice it doesn't seem to take much processing power even if it might seem inefficient. I Don't know how it compiles up but the executable might be efficient especially if acceleration is on - vector graphics tends to be.
Drawing in Usine is very similar to using html5 canvas api. I believe that requires a full redraw every time.

Statistics: Posted by sm_jamieson — 10 Jan 2024, 21:24


]]>
2024-01-01T13:37:40+02:00 2024-01-01T13:37:40+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45160#p45160 <![CDATA[Re: Paint Image/Frame]]> that means repaint xy pixels sections over a background pre-computed 'image'. but for that man must be able to draw that 'buffer image' in the first place, and store it, and then be able to also only repaint/flag 'dirty' areas.

thats how its done is juce: the 'component' has an image buffer.
man compute/paint all thing that won't change to that buffer (only once), that is your "resulting color'. then juce will use/display that buffer instead of complex repainting that 'build' that image. then if say a cusor rectangle needs to move on top of that, man say someting like: repaint(this_rectangle_only); //(technically also the previous one, as need to be 'erased'..)

but afaii usine paint procedure doesn't allow such thing to 'only re-paint a specific area', the paint call 'flags' complete module area as 'dirty'

technically that kinda is possible already using two modules: one paints the "buffered image" baground layer, feed that to the "Bitmap in" of a second module, that only repaint changing stuff on top of that as an 'overlay' layer. but that is not very handy to use 2x separated modules.
goal here would be do to it all in a single module.. will investigate a bit more..

Statistics: Posted by 23fx23 — 01 Jan 2024, 12:37


]]>
2023-12-31T20:30:16+02:00 2023-12-31T20:30:16+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45159#p45159 <![CDATA[Re: Paint Image/Frame]]> Not an expert in that field, but shouldn't be an idea to compute the resulting color instead of adding some layers and then repaint only the rectangle that has changed ?

Statistics: Posted by oli_lab — 31 Dec 2023, 19:30


]]>
2023-12-29T16:56:53+02:00 2023-12-29T16:56:53+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45157#p45157 <![CDATA[Paint Image/Frame]]> for ex:
L0: background/grid
L1: wavform path
L2: slices/markers colors semi transparent rectangles
L3 : finally a 'selection' overlay hilight of one of the slice on top of previous layers ect..

Image

for now every paint call needs to repaint everything from bottom to top, which i feel is not most efficient method.
ideally i would 'buffer' pre-computed static stuff to some image(s) (like bg/grid/wavform/slices colors) could be buffered to one image
so then could paint that pre-calc image, and only the stuff that really changed (here my slice selector) would then be repainted on top of that.
(that is what i usually do in such cases for ex in juce)

I didn't deeply investigated UsineFrame and video stuff yet, so not sure something can be done here, like maybe dirrectly painting to some bmp in,
or an 'internal' image.. but i don't seem to find sdkpaint methods like 'draw Frame /draw image ect.
So Just curious if some users experimented with this, and might have advices / know if something is possible along those lines?

Statistics: Posted by 23fx23 — 29 Dec 2023, 15:56


]]>
BrainModular BrainModular Users Forum 2024-01-15T11:36:24+02:00 https://www.brainmodular.com/forums/app.php/feed/topic/7210 2024-01-15T11:36:24+02:00 2024-01-15T11:36:24+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45193#p45193 <![CDATA[Re: Paint Image/Frame]]> It could take an array on ARGB (or RGBA on macOS?) pixels and just blit it into the canvas?

Statistics: Posted by senso — 15 Jan 2024, 10:36


]]>
2024-01-11T15:17:16+02:00 2024-01-11T15:17:16+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45184#p45184 <![CDATA[Re: Paint Image/Frame]]> i spend shittons of time optimizing such things in juce i might be biased.. always cache paths/buffers ect
still think some basic still frames manipulation kit could be nice, like load an image, jpg/png to usine frame format,
ideally save some buffer to them, beeing able to simply repaint a stored frame in paint proc even on 'normal' modules would be nice.
maybe just some strecth to fit rect transorm that would be more efficient than looping thru each pixels. atm i don't think man can really paint an image unless im mistaken

Statistics: Posted by 23fx23 — 11 Jan 2024, 14:17


]]>
2024-01-10T22:24:04+02:00 2024-01-10T22:24:04+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45180#p45180 <![CDATA[Re: Paint Image/Frame]]> I wrote a user module that draws a full 88 note keyboard with highlighted keys. Every key with a load of draw paths, fills, etc. The idea that I would have to redraw all that whenever Usine requested seemed like a disaster.
In practice it doesn't seem to take much processing power even if it might seem inefficient. I Don't know how it compiles up but the executable might be efficient especially if acceleration is on - vector graphics tends to be.
Drawing in Usine is very similar to using html5 canvas api. I believe that requires a full redraw every time.

Statistics: Posted by sm_jamieson — 10 Jan 2024, 21:24


]]>
2024-01-01T13:37:40+02:00 2024-01-01T13:37:40+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45160#p45160 <![CDATA[Re: Paint Image/Frame]]> that means repaint xy pixels sections over a background pre-computed 'image'. but for that man must be able to draw that 'buffer image' in the first place, and store it, and then be able to also only repaint/flag 'dirty' areas.

thats how its done is juce: the 'component' has an image buffer.
man compute/paint all thing that won't change to that buffer (only once), that is your "resulting color'. then juce will use/display that buffer instead of complex repainting that 'build' that image. then if say a cusor rectangle needs to move on top of that, man say someting like: repaint(this_rectangle_only); //(technically also the previous one, as need to be 'erased'..)

but afaii usine paint procedure doesn't allow such thing to 'only re-paint a specific area', the paint call 'flags' complete module area as 'dirty'

technically that kinda is possible already using two modules: one paints the "buffered image" baground layer, feed that to the "Bitmap in" of a second module, that only repaint changing stuff on top of that as an 'overlay' layer. but that is not very handy to use 2x separated modules.
goal here would be do to it all in a single module.. will investigate a bit more..

Statistics: Posted by 23fx23 — 01 Jan 2024, 12:37


]]>
2023-12-31T20:30:16+02:00 2023-12-31T20:30:16+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45159#p45159 <![CDATA[Re: Paint Image/Frame]]> Not an expert in that field, but shouldn't be an idea to compute the resulting color instead of adding some layers and then repaint only the rectangle that has changed ?

Statistics: Posted by oli_lab — 31 Dec 2023, 19:30


]]>
2023-12-29T16:56:53+02:00 2023-12-29T16:56:53+02:00 https://www.brainmodular.com/forums/viewtopic.php?t=7210&p=45157#p45157 <![CDATA[Paint Image/Frame]]> for ex:
L0: background/grid
L1: wavform path
L2: slices/markers colors semi transparent rectangles
L3 : finally a 'selection' overlay hilight of one of the slice on top of previous layers ect..

Image

for now every paint call needs to repaint everything from bottom to top, which i feel is not most efficient method.
ideally i would 'buffer' pre-computed static stuff to some image(s) (like bg/grid/wavform/slices colors) could be buffered to one image
so then could paint that pre-calc image, and only the stuff that really changed (here my slice selector) would then be repainted on top of that.
(that is what i usually do in such cases for ex in juce)

I didn't deeply investigated UsineFrame and video stuff yet, so not sure something can be done here, like maybe dirrectly painting to some bmp in,
or an 'internal' image.. but i don't seem to find sdkpaint methods like 'draw Frame /draw image ect.
So Just curious if some users experimented with this, and might have advices / know if something is possible along those lines?

Statistics: Posted by 23fx23 — 29 Dec 2023, 15:56


]]>