Method AnchorPivotInRect
AnchorPivotInRect(IMap<Vector3, GridPoint3>, IExplicitShape<GridPoint3>, Func<GridPoint3, Vector3>, HorizontalAlignment, VerticalAlignment)
It returns a Map that translate in such a way that it is aligned horizontally and vertically according to the given alignment. This is different to the normal AlignGrid methods, since this one take in account the pivot used in the cell.
public static IMap<Vector3, GridPoint3> AnchorPivotInRect(this IMap<Vector3, GridPoint3> map, IExplicitShape<GridPoint3> shape, Func<GridPoint3, Vector3> cellSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment)
Parameters
map
IMap<Vector3, GridPoint3>Base map where you apply this call.
shape
IExplicitShape<GridPoint3>Shape used in the map.
cellSize
Func<GridPoint3, Vector3>This function is used to calculate the size of a cell.
horizontalAlignment
HorizontalAlignmentType of horizontal alignment to apply.
verticalAlignment
VerticalAlignmentType of vertical alignment to apply.
Returns
AnchorPivotInRect<TPoint>(IMap<Vector3, Vector3>, IExplicitShape<TPoint>, Func<TPoint, Vector3>, HorizontalAlignment, VerticalAlignment)
It returns a Map that translate in such a way that it is aligned horizontally and vertically according to the given alignment. This is different to the normal AlignGrid methods, since this one take in account the pivot used in the cell.
public static IMap<Vector3, Vector3> AnchorPivotInRect<TPoint>(this IMap<Vector3, Vector3> map, IExplicitShape<TPoint> shape, Func<TPoint, Vector3> cellSize, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment)
Parameters
map
IMap<Vector3, Vector3>Base map where you apply this call.
shape
IExplicitShape<TPoint>Shape used in the map.
cellSize
Func<TPoint, Vector3>This function is used to calculate the size of a cell.
horizontalAlignment
HorizontalAlignmentType of horizontal alignment to apply.
verticalAlignment
VerticalAlignmentType of vertical alignment to apply.
Returns
Type Parameters
TPoint