Search Results for

    Show / Hide Table of Contents

    TClientAnchor.CreateKeepingAspectRatio Method

    This method will create an anchor so the image keeps its aspect ratio, and it is contained inside the group of cells. If you supply negative values for Col2 or Row2, then those values will be ignored. If you set Col2 negative, then this method will place the image between Row1 and Row2, and calculate Col2 so the image keeps its aspect ratio. Similar if you set Row2 negative.

    Syntax

    Namespace: FlexCel.Core

    public static TClientAnchor CreateKeepingAspectRatio(TUIImage Image, TFlxAnchorType aAnchorType, Int32 aRow1, Int32 aDy1, Int32 aCol1, Int32 aDx1, Int32 aRow2, Int32 aDy2, Int32 aCol2, Int32 aDx2, TFlexCelImageVertAlign aVAlign, TFlexCelImageHorizAlign aHAlign, IRowColSize Workbook)

    Parameters

    <-> Parameter Type Description
    Image TUIImage Image that you want to insert. It is used to know its dimensions and dpi.
    aAnchorType TFlxAnchorType How the image behaves when copying/inserting cells.
    aRow1 Int32 First Row of object.
    aDy1 Int32 Delta y of image on 1/255 of a cell. 0 means totally at the top, 128 on half of the cell, 255 means at the top of next cell.
    aCol1 Int32 First column of object.
    aDx1 Int32 Delta x of image, on 1/1024 of a cell. 0 means totally at the left, 512 on half of the cell, 1024 means at the left of next cell.
    aRow2 Int32 Last row of object.Set it to 0 or negative for unlimited rows.
    aDy2 Int32 Delta y of image on 1/255 of a cell. 0 means totally at the top, 128 on half of the cell, 255 means at the top of next cell.
    aCol2 Int32 Last column of object.Set it to 0 or negative for unlimited columns.
    aDx2 Int32 Delta x of image, on 1/1024 of a cell. 0 means totally at the left, 512 on half of the cell, 1024 means at the left of next cell.
    aVAlign TFlexCelImage​Vert​Align How the image will be fit inside the range of cells.
    aHAlign TFlexCelImage​Horiz​Align How the image will be fit inside the range of cells.
    Workbook IRowColSize ExcelFile with the workbook, used to calculate the cells.

    See also

    • TClientAnchor
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com