C# 클래스 TemplNET.TemplGraphic

Used to store/load images and generate (scaled) pictures.
파일 보기 프로젝트 열기: CPonty/templ-dot-net 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Alignment Alignment?
Description string
Scalar double
Stream MemoryStream

보호된 프로퍼티들

프로퍼티 타입 설명
Image Novacode.Image

공개 메소드들

메소드 설명
Load ( DocX doc ) : TemplGraphic

Load image into document. Required before producing a Picture for the document.

Picture ( ) : Picture

Generate a Picture instance, which can be inserted into a Document

Picture ( double scalar ) : Picture

Generate a Picture instance, which can be inserted into a Document

Picture ( uint width ) : Picture

Generate a Picture instance, which can be inserted into a Document

TemplGraphic ( Stream data, Alignment align = null, double scalar = 1.0, string description = "" ) : System

New graphic from data stream

TemplGraphic ( byte data, Alignment align = null, double scalar = 1.0, string description = "" ) : System

New graphic from file data

TemplGraphic ( string file, Alignment align = null, double scalar = 1.0, string description = "" ) : System

New graphic from filename

메소드 상세

Load() 공개 메소드

Load image into document. Required before producing a Picture for the document.
public Load ( DocX doc ) : TemplGraphic
doc DocX
리턴 TemplGraphic

Picture() 공개 메소드

Generate a Picture instance, which can be inserted into a Document
public Picture ( ) : Picture
리턴 Picture

Picture() 공개 메소드

Generate a Picture instance, which can be inserted into a Document
public Picture ( double scalar ) : Picture
scalar double The scaling factor (0.5 is 50%)
리턴 Picture

Picture() 공개 메소드

Generate a Picture instance, which can be inserted into a Document
public Picture ( uint width ) : Picture
width uint The width in pixels
리턴 Picture

TemplGraphic() 공개 메소드

New graphic from data stream
public TemplGraphic ( Stream data, Alignment align = null, double scalar = 1.0, string description = "" ) : System
data Stream
align Alignment
scalar double
description string
리턴 System

TemplGraphic() 공개 메소드

New graphic from file data
public TemplGraphic ( byte data, Alignment align = null, double scalar = 1.0, string description = "" ) : System
data byte
align Alignment
scalar double
description string
리턴 System

TemplGraphic() 공개 메소드

New graphic from filename
public TemplGraphic ( string file, Alignment align = null, double scalar = 1.0, string description = "" ) : System
file string
align Alignment
scalar double
description string
리턴 System

프로퍼티 상세

Alignment 공개적으로 프로퍼티

Alignment when inserting into the document (e.g. Left, Right, Centre). No change in alignment if null
public Alignment? Alignment
리턴 Alignment?

Description 공개적으로 프로퍼티

String description of the image. Has no automatic function; useful for storing caption text in the model.
public string Description
리턴 string

Image 보호되어 있는 프로퍼티

Underlying DocX image instance Not populated until document build time, as it requires a reference to a DocX document
protected Image,Novacode Image
리턴 Novacode.Image

Scalar 공개적으로 프로퍼티

Resizing factor when inserting into the document. Maintains aspect ratio
public double Scalar
리턴 double

Stream 공개적으로 프로퍼티

Image data as memory stream
public MemoryStream Stream
리턴 MemoryStream