AlignmentUtils.CeilToPanelPixelSize

Declaration

public static float CeilToPanelPixelSize(UIElements.VisualElement ve, float v);

Description

Return the next larger value representing a whole number of pixels on the target when rendered.

It will only work on visualElements inside a panel.

Is is used to get dimensions repesenting whole pixels used for layout values, translations or in the generation of the visual Content. It does not consider the transform of the element and its ancestors.

This method uses the scaling from [see cref="VisualElement.scaledPixelsPerPoint"/> and uses the same rounding thresholds as the layout engine.


Did you find this page useful? Please give it a rating: