Class FileCreateSource

FileCreateSource class

생성할 파일 소스를 나타냅니다.

public sealed class FileCreateSource : FileSource

생성자

이름설명
FileCreateSource(string)의 새 인스턴스를 초기화합니다.FileCreateSource 클래스.
FileCreateSource(string, bool)의 새 인스턴스를 초기화합니다.FileCreateSource 클래스.

속성

이름설명
FilePath { get; }생성할 파일 경로를 가져옵니다.
override IsTemporal { get; }파일이 일시적인지 여부를 나타내는 값을 가져옵니다.

행동 양식

이름설명
override GetStreamContainer()스트림 컨테이너를 가져옵니다.

이 예제는 Font 및 SolidBrush 클래스를 사용하여 이미지 표면에 문자열을 그리는 방법을 보여줍니다. 이 예에서는 Figures 및 GraphicsPath를 사용하여 새 이미지를 만들고 도형을 그립니다.

[C#]

//이미지 인스턴스 생성
using (Aspose.PSD.Image image = new Aspose.PSD.FileFormats.Psd.PsdImage(500, 500))
{
    // Graphics 클래스의 인스턴스 생성 및 초기화
    Aspose.PSD.Graphics graphics = new Aspose.PSD.Graphics(image);

    //그래픽 표면을 지웁니다.
    graphics.Clear(Color.Wheat);

    //Font 인스턴스 생성
    Aspose.PSD.Font font = new Aspose.PSD.Font("Times New Roman", 16);

    //빨간색을 갖는 SolidBrush의 인스턴스 생성
    Aspose.PSD.Brushes.SolidBrush brush = new Aspose.PSD.Brushes.SolidBrush(Color.Red);

    //문자열 그리기
    graphics.DrawString("Created by Aspose.PSD for .Net", font, brush, new PointF(100, 100));

    // 내보내기 옵션을 만듭니다.
    Aspose.PSD.ImageOptions.GifOptions options = new Aspose.PSD.ImageOptions.GifOptions();

    // 모든 변경 사항 저장
    image.Save("C:\\temp\\output.gif", options);
}

또한보십시오