• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

sourceRectAtTime options confusion

Participant ,
Aug 23, 2017 Aug 23, 2017

Copy link to clipboard

Copied

sourceRectAtTime method has an includeExtents parameter, that includes the shape layer bounds. This must be the stroke.

I've put this parameter to test and got mixed results. Check this 2 images. Stroke width is 10 (I guess px) in both cases. With includeExtents set to false, width is is 499px. But if set to TRUE, then the width becomes 549px. That is 5x the amount of stroke. What is going on here? Numbers just don't add up. Also I've drawn 2 rulers that prove that width of the stroke is in fact, 10px.

Screen Shot 2017-08-23 at 12.52.13.png

Screen Shot 2017-08-23 at 12.52.02.png

TOPICS
Expressions

Views

2.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 23, 2017 Aug 23, 2017

All vector rendering expands beyond the actual visible content to calculate antialiasing and such. Therefore the extended bounding box represents a virtual canvas on which the actual fills are painted, whereas the geometry bounding box encompasses the path. In case of text this would be the difference between the em box used for kerning and so on vs. the actual contours. For shape layers a similar logic applies, though this stuff doesn't seem to be documented anywhere, so the actual extents of a

...

Votes

Translate

Translate
LEGEND ,
Aug 23, 2017 Aug 23, 2017

Copy link to clipboard

Copied

Extents mean the rendering canvas, not any shape element. The paint canvas always has considerable padding. Since you know the values of your stroke, simply add them in whatever formula you use.

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 23, 2017 Aug 23, 2017

Copy link to clipboard

Copied

Hey Mylenium! Thanks for taking your time. I admit, I am even more confused What is rendering canvas of a layer? What padding, where did it come from? i've never seen any padding added to any layer in AE. Could you add a little more detail to your answer?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 23, 2017 Aug 23, 2017

Copy link to clipboard

Copied

LATEST

All vector rendering expands beyond the actual visible content to calculate antialiasing and such. Therefore the extended bounding box represents a virtual canvas on which the actual fills are painted, whereas the geometry bounding box encompasses the path. In case of text this would be the difference between the em box used for kerning and so on vs. the actual contours. For shape layers a similar logic applies, though this stuff doesn't seem to be documented anywhere, so the actual extents of a layer when using this option are never quite clear. It's best not to use it and add your own padding and margins via your code.

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines