Show / Hide Table of Contents

Class Layout

A Layout defines the placement of one or more patches on a paper. A patch is the projection of a model into the two dimensional space with respect to scaling, projection direction, visibility of layers etc. A Layout can be viewed with the LayoutView and can be printed.

Inheritance
System.Object
Layout
Implements
System.Runtime.Serialization.ISerializable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CADability
Assembly: CADability.dll
Syntax
[Serializable]
public class Layout : ISerializable

Constructors

| Improve this Doc View Source

Layout(Project)

Creates an empty Layout

Declaration
public Layout(Project project)
Parameters
Type Name Description
Project project

The Project containing the layout

| Improve this Doc View Source

Layout(SerializationInfo, StreamingContext)

Declaration
protected Layout(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info
System.Runtime.Serialization.StreamingContext context

Fields

| Improve this Doc View Source

pageSettings

The printer settings.

Declaration
public PageSettings pageSettings
Field Value
Type Description
System.Drawing.Printing.PageSettings

Properties

| Improve this Doc View Source

Name

Gets or sets the name of the layout.

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

PaperHeight

Gets or sets the height of the total layout area. When printing the layout this is assumed to be in mm

Declaration
public double PaperHeight { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

PaperWidth

Gets or sets the width of the total layout area. When printing the layout this is assumed to be in mm

Declaration
public double PaperWidth { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

PatchCount

Returns the number of the patches

Declaration
public int PatchCount { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

AddPatch(Model, Projection, Border)

Adds a "patch" to the layout. A patch is a a model with a certain projection placed on a section of the layout. The projection includes the placement of the model inside the section and the scaling.

Declaration
public void AddPatch(Model model, Projection projection, Border area)
Parameters
Type Name Description
Model model

The model for the patch

Projection projection

the projection for the model

Border area

The area on the layout

| Improve this Doc View Source

AddPatch(Model, Projection, Border, LayoutView)

Declaration
public void AddPatch(Model model, Projection projection, Border area, LayoutView layoutView)
Parameters
Type Name Description
Model model
Projection projection
Border area
LayoutView layoutView
| Improve this Doc View Source

AddVisibleLayer(Int32, Layer)

Marks the given Layer as visible in the context of this ProjectedModel.

Declaration
public void AddVisibleLayer(int index, Layer l)
Parameters
Type Name Description
System.Int32 index
Layer l

The layer

| Improve this Doc View Source

CenterPatch(Int32, Double, Layout.HorizontalCenter, Layout.VerticalCenter)

Centers the patch with the given index according to the horizontal and vertical center mode. If scale is 0.0 the current scaling remains unchanged.

Declaration
public void CenterPatch(int index, double scale, Layout.HorizontalCenter hor, Layout.VerticalCenter ver)
Parameters
Type Name Description
System.Int32 index

index of the patch

System.Double scale

scaling factor or 0.0

Layout.HorizontalCenter hor

horizontal position mode

Layout.VerticalCenter ver

vertical position mode

| Improve this Doc View Source

Finalize()

Declaration
protected void Finalize()
| Improve this Doc View Source

GetPatch(Int32, out Model, out Projection, out Border)

Returns the data that describe the patch with the given index.

Declaration
public void GetPatch(int index, out Model model, out Projection projection, out Border area)
Parameters
Type Name Description
System.Int32 index

Index of the patch

Model model

The model for the patch

Projection projection

the projection for the model

Border area

The area on the layout

| Improve this Doc View Source

IsLayerVisible(Int32, Layer)

Determins whether the given Layer is marked visible in the context of this ProjectedModel.

Declaration
public bool IsLayerVisible(int index, Layer l)
Parameters
Type Name Description
System.Int32 index
Layer l

The layer

Returns
Type Description
System.Boolean
| Improve this Doc View Source

MovePatch(Int32, Double, Double)

Places the patch on the paper leaving the scalinfactor unchanged. The parameters specify the position of the model origin on the paper.

Declaration
public void MovePatch(int index, double xPos, double yPos)
Parameters
Type Name Description
System.Int32 index
System.Double xPos

horizontal position of the origin

System.Double yPos

vertical position of the origin

| Improve this Doc View Source

RemovePatch(Int32)

Removes the patch with the given index

Declaration
public void RemovePatch(int index)
Parameters
Type Name Description
System.Int32 index
| Improve this Doc View Source

RemoveVisibleLayer(Int32, Layer)

Marks the given Layer as invisible in the context of this ProjectedModel.

Declaration
public void RemoveVisibleLayer(int index, Layer l)
Parameters
Type Name Description
System.Int32 index
Layer l

The layer

| Improve this Doc View Source

SetPatch(Int32, Model, Projection, Border)

Changes the data of the patch with the given index.

Declaration
public void SetPatch(int index, Model model, Projection projection, Border area)
Parameters
Type Name Description
System.Int32 index

Index of the patch

Model model

The model for the patch

Projection projection

the projection for the model

Border area

The area on the layout

Explicit Interface Implementations

| Improve this Doc View Source

ISerializable.GetObjectData(SerializationInfo, StreamingContext)

Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
Type Name Description
System.Runtime.Serialization.SerializationInfo info
System.Runtime.Serialization.StreamingContext context

Implements

System.Runtime.Serialization.ISerializable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX