When using LAYERS, I can display a brush as a Layer, then if I keep changing the size of that Layer, I can get the current width and height by using the GetAttribute() command.
Since I am now using Brushes without LAYERS ON, then is there anything similar to use to get the current size of my brush?
Point is that I have this own made my_DisplayBrush function, which also takes care of the size of the Brush automatically, and basically, in programming terms, I don't want to know anything about how this my_DisplayBrush function works, but now I have come to a situation where I would actually need to know in which size the current brush is being displayed.
So do I have to modify my_DisplayBrush function to actually give this information to me, or can I use something like GetAttribute() command to figure it out?
Is there option to get current displayed brush width without LAYERS?
Re: Is there option to get current displayed brush width without LAYERS?
GetAttribute() doesn't work?
Code: Select all
GetAttribute(#BRUSH, your_brush_id, #ATTRWIDTH)
PowerBook 5.2 MorphOS 3.15
PowerBook 5.8 MorphOS 3.15
Amiga 1200 BPPC/BVision AOS4.1 FE
PowerBook 5.8 MorphOS 3.15
Amiga 1200 BPPC/BVision AOS4.1 FE
Re: Is there option to get current displayed brush width without LAYERS?
No, because point is that when I display the brush in my my_DisplayBrush() command, it affects the size. So the brush being displayed can be for example 100x100, but in reality it might be displayed as 50x50, for which reason using GetAttribute() would give me the 100x100, not the 50x50 which it in reality is.
Re: Is there option to get current displayed brush width without LAYERS?
Ok, I see.
So inside your function you use DisplayBrush() to show it scaled? Maybe using a copy with ScaleBrush() instead and displaying that one? That way you can use GetAttribute() with the copy.
So inside your function you use DisplayBrush() to show it scaled? Maybe using a copy with ScaleBrush() instead and displaying that one? That way you can use GetAttribute() with the copy.
PowerBook 5.2 MorphOS 3.15
PowerBook 5.8 MorphOS 3.15
Amiga 1200 BPPC/BVision AOS4.1 FE
PowerBook 5.8 MorphOS 3.15
Amiga 1200 BPPC/BVision AOS4.1 FE
Re: Is there option to get current displayed brush width without LAYERS?
Not the most elegant solution, but could work. For this way I wouldn't need to know the inner works of my_DisplayBrush function, nor need it to return anything. I might use this. Thanks!