CopyBrush shift position

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

CopyBrush shift position

Post by ilbarbax »

I have the following problem: If I copy a brush, then the new bust is not identical to the original one, but the content is shifted by one pixel down and one right, then copying recursively the same brush at the end the content will disappear.
I use 4.7 version
Why?
User avatar
airsoftsoftwair
Posts: 5933
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: CopyBrush shift position

Post by airsoftsoftwair »

That looks more like a bug in your code because CopyBrush() creates an idental copy. Can you post a very small code snippet that illustrates the issue?
ilbarbax
Posts: 158
Joined: Thu Apr 01, 2010 6:41 pm

Re: CopyBrush shift position

Post by ilbarbax »

@Andreas,

Ok, I did some test on a simple script and is confirmed that is my code who create the problem. At this point I wonder there is some setup someware who introduce this shifting: Is there any command that I may have used that could cause that?.
I lost one weekend serching for the root cause.
ilbarbax
Posts: 158
Joined: Thu Apr 01, 2010 6:41 pm

Re: CopyBrush shift position

Post by ilbarbax »

ilbarbax wrote:@Andreas,

Ok, I did some test on a simple script and is confirmed that is my code who create the problem. At this point I wonder there is some setup someware who introduce this shifting: Is there any command that I may have used that could cause that?.
I lost one weekend serching for the root cause.
Finally I found the bug. Definitely my fault. (I was scaling the brush and then rescaling it back after some modifications. With odd dimensions, at the end it was loosing one pixel)
Post Reply