Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Rectangle

Hierarchy

  • Rectangle

Implements

Index

Constructors

Properties

Constructors

constructor

  • 从宽度和高度创建矩形.

    Example:

    //Create a rectangle from width and height
    
    var model = new vjgeo.models.Rectangle(50, 100);
    vjgeo.exporter.toDWG(model);
    

    Parameters

    • width: number

      Width of the rectangle.

    • height: number

      Height of the rectangle.

    • Optional data: IProperties

      属性数据

    Returns Rectangle

  • 创建一个将围绕模型的矩形.

    Example:

    //Create a rectangle which will surround a model
    
    var e = new vjgeo.models.Ellipse(17, 10); // draw an ellipse so we have something to surround.
    var r = new vjgeo.models.Rectangle(e, 3); // draws a rectangle surrounding the ellipse by 3 units.
    vjgeo.exporter.toDWG({ models: { e: e, r: r }});
    

    Parameters

    • modelToSurround: IModel

      IModel object.

    • Optional margin: number

      Optional 与模型的距离.

    • Optional data: IProperties

      属性数据

    Returns Rectangle

  • 从测量创建矩形.

    Example:

    //Create a rectangle from a measurement.
    
    var e = new vjgeo.models.Ellipse(17, 10); // draw an ellipse so we have something to measure.
    var m = vjgeo.measure.modelExtents(e);    // measure the ellipse.
    var r = new vjgeo.models.Rectangle(m);    // draws a rectangle surrounding the ellipse.
    vjgeo.exporter.toDWG({ models: { e: e, r: r }});
    

    Parameters

    Returns Rectangle

Properties

data

origin

origin: IPoint

paths

paths: IPathMap

Generated using TypeDoc