lineAlignment at small sizes
See original GitHub issueExpected Behavior
- Inside stroke is contained within the fillable area of an object (it certainly shouldn’t extend further than center stroke)
- Outside stroke edges do not clip
Current Behavior
https://pixiplayground.com/#/edit/bvjRVoDSNkUH9TGF_Ihsm
Columns left to right are: Outside, Center, Inside Rows are the same item
Possible Solution
Eeek, I know this a tough problem, stuff starts breaking down when stroke is larger than the fillable area.
- The outside stroke edges clipping looks like a
miterLimit
issue (could that be exposed for GraphicslineStyle
)? - Clipping the inside stroke to the fill of the item
Environment
pixi.js
version: _e.g. 5.2.1- Browser & Version: Chrome 80
- OS & Version: macOS Mojave
- Running Example: https://pixiplayground.com/#/edit/bvjRVoDSNkUH9TGF_Ihsm
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (6 by maintainers)
Top Results From Across the Web
c# - Dynamically resizing font to fit space while using Graphics ...
In this case text will go out of the Room dimension, if bitmap dpi is larger than system dpi and font size will...
Read more >vertically align texts of different sizes and allow line breaks - TeX
I would like to vertically align texts of different sizes in latex ( xelatex ). For example, normal {\footnotesize small} normal does base-line...
Read more >Alignment, font styles, and horizontal rules in HTML documents
A relative increase in font size. The value "+1" means one size larger. The value "-3" means three sizes smaller. All sizes belong...
Read more >Text Formatting Attributes (Msc-generator 6.3.0)
This can be left , center or right and specifies the line alignment of the label. The default is centering, ... text.size.normal; text.size.small....
Read more >Why same font size are appearing different at different zoom
Why same font size are appearing different at different zoom level? Image. Please see the end of the line alignment. This thread is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SukantPal thanks for the explanation. So my understanding is that its not necessarily the optimal way of it working but its a design decision based on it being more expensive to work out where the fill will be located.
The reason this is an issue for me is that I am building a drawing tool for designers and thus want them to be able to add polygons and choose their line alignment, so I am unable to control the direction of the polygons created.
I will be looking at porting my existing line alignment which uses double width stroke and composite operations to perform inside and outside strokes. Will feedback my success.
@ivanpopelyshev that’s fair, I am just starting down my journey with pixi.js and evaluating its level of support for our current offering (as we feel the need to move to a more performant base). I have similar time constraints at the moment and like you need to put more time into bigger issues but when this is a larger priority for us I will try and revive the
miterLimit
andlineJoin
issues.Regarding the inside stroke escaping the fill area has this been evaluated before?
Not sure how you are implementing
lineAlignment
but I had a canvas 2D solution that doesn’t require path offsetting: https://jsbin.com/merosuranu/1/edit?html,js,outputThis is very exciting 😄