Problem with Negative Angle Rotation

Upload Area - Upload Files Here, link to them from the appropriate Forum

Moderators: Tom, Kukurykus

Mike Hale

Problem with Negative Angle Rotation

Post by Mike Hale »

You could get all the pathpoints and determine which two are the top most points. Then of those two determine which is the left most point and use that point as the startline point and use the other as the endline point. It would be alot of work and I am not sure exactly how to do that.

But I really think that you would be better off by taking care when creating your templates.

Mike
soorya

Problem with Negative Angle Rotation

Post by soorya »

Thanks Mike,
Pls. read my point 3 in previous quote.
The steps you say is very easy for me to do in VB6.
But I should get the result.
Any how I will try that and let you know.

When I make the Template I can take care. But when I get templates from Net or from other designer, I can't expect the templates should be perfect.
I have several templates from others, and those are practically working templates. In which I face these problems.

Pls. comment on my new point 3

soorya
Mike Hale

Problem with Negative Angle Rotation

Post by Mike Hale »

I think the problem you are having is because you are making a path from a selection.

When you make a path with the shape or pen tool there are a small number of pathpoints. The rectangle shape for example only has 4 points. For that reason it is easy to get the angle because of the length between points.

Most paths that are made by converting a selection has a lot of points. It's not a bug in Photoshop. It's because the selection is pixel based. With that kind of path it is hard to know which points to use and even then the length between those points are too short to give a true angle for the overall shape.

When doing your steps don't use the selection tools, use the path tool or just copy the shape layer mask to the new layer.

Mike
soorya

Problem with Negative Angle Rotation

Post by soorya »

Thanks again Mike,
I had that problem few days back. Several Point in a rect and was difficult to get angle. I made some work arround and get only 4 points.
But if I could do selection with Pen/Shape then it could be better. I agree.

You could get all the pathpoints and determine which two are the top most points. Then of those two determine which is the left most point and use that point as the startline point and use the other as the endline point. It would be alot of work and I am not sure exactly how to do that.


I think the above logic of your's should work well. I am trying and got what I wanted. Still I have to check in many conditions.

soorya
soorya

Problem with Negative Angle Rotation

Post by soorya »

Mike,

Pls. let me know how to create Path only with 4 Points by scripting.
I have a Rectangle or I have 4 points with me
Eg: (0,0), (100,0), (100,50),(0,50)

How to make a new Vector Mask layer with only 4 points Path by scripting ?

soorya
xbytor

Problem with Negative Angle Rotation

Post by xbytor »

soorya wrote:How to make a new Vector Mask layer with only 4 points Path by scripting ?

ScriptingListener is your friend. Really.

-X