Skip to main content
Richard Rosenman
Inspiring
November 9, 2022
Question

How to plot a pixel within a mask path, or along it's edge?

  • November 9, 2022
  • 2 replies
  • 216 views

Hi gang!

 

I am working with paths for the first time in my plugin. I have followed the PathMaster example project and I can successfully determine if there is a valid path on my layer, and whether it is open or closed. So far so good but that's about as far as I can get with the PathMaster project as the rest is unrelated to my needs.

 

For my plugin, I want to be able to plot a pixel either in the inside of the closed path, or along the edge of a closed or open path.

 

I read through the SDK manual and it provides some basic info about working with paths. It discusses the PF_PATHDATASUITE1 and lists some of the functions but none seem specific to what I need to do.

 

My question is: how should I go about achieving this? Are there any specific functions you can suggest that are best suited for these requirements? Any other recommendations or tips of the process to do this?

 

Thanks in advance,

-Richard

This topic has been closed for replies.

2 replies

Community Expert
November 9, 2022

well, the AE API offers PF_MaskWorldWithPath, to render a mask. but that's it.

if you need to render some custom path, or just stroke instead of fill, you'll need to build some rendering code. the concpet is usually reffered to as "polygon rendering". here's a video about it:
https://www.youtube.com/watch?v=Xw7x4m_SR6s

 

Mylenium
Legend
November 9, 2022

Just from a quick glance it seems it expects you to derive the actual positions yourself to paint your stuff, which probably requires some matrix operations or other vector math.

 

Mylenium