Missing function CopyBrushPart?

Discuss any general programming issues here
Post Reply
ilbarbax
Posts: 117
Joined: Thu Apr 01, 2010 6:41 pm

Missing function CopyBrushPart?

Post by ilbarbax »

Do I miss something but a function like this does not exists.
It would be nice to have a dedicated function rather to have something like this:
CreateBrush(999,Xw,Yw)
SelectBrush(999)
DisplayBrushPart(act_item,xact,yact,0,0,Xw,Yw)
EndSelect()
CopyBrush(999,994)
FreeBrush(999)

may be adding table with some embedded transformation like blur, tint etc
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Missing function CopyBrushPart?

Post by airsoftsoftwair »

Why do you make a copy of the brush at the end? Why not simply use brush 999? Maybe CropBrush() can also help you.
ilbarbax
Posts: 117
Joined: Thu Apr 01, 2010 6:41 pm

Re: Missing function CopyBrushPart?

Post by ilbarbax »

Sorry it is because I straight extract it from my code where I use 999 brush as dummy brush, but the question does not change, as far as I know CopyBrush copies the whole brush
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Missing function CopyBrushPart?

Post by airsoftsoftwair »

Ok. You can make a CopyBrushPart() function on your own. If you do it like in your example code, it even won't be noticeably slower than a dedicated version because there's very little overhead in your code. Implementing a dedicated function in Hollywood wouldn't be faster because it would effectively do the same as your code.
Post Reply