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
- mapIMap<Vector3, GridPoint3>
- Base map where you apply this call. 
- shapeIExplicitShape<GridPoint3>
- Shape used in the map. 
- cellSizeFunc<GridPoint3, Vector3>
- This function is used to calculate the size of a cell. 
- horizontalAlignmentHorizontalAlignment
- Type of horizontal alignment to apply. 
- verticalAlignmentVerticalAlignment
- Type 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
- mapIMap<Vector3, Vector3>
- Base map where you apply this call. 
- shapeIExplicitShape<TPoint>
- Shape used in the map. 
- cellSizeFunc<TPoint, Vector3>
- This function is used to calculate the size of a cell. 
- horizontalAlignmentHorizontalAlignment
- Type of horizontal alignment to apply. 
- verticalAlignmentVerticalAlignment
- Type of vertical alignment to apply. 
Returns
Type Parameters
- TPoint