IRONSOFTWAREHOME
반사 효과 추가
using IronWord;
using IronWord.Models;

// Create new Word document
WordDocument doc = new WordDocument();

// Create and configure text style
TextStyle textStyle = new TextStyle();
textStyle.TextEffect = new TextEffect()
{
    ReflectionEffect = new Reflection(),
};

// Create paragraph
Paragraph paragraph = new Paragraph();

// Create run with text and style
Run textRun = new Run(new TextContent("Hello World"));
textRun.Style = textStyle;

// Add run to paragraph
paragraph.AddChild(textRun);

// Add paragraph to document
doc.AddParagraph(paragraph);

// Export new Word document
doc.SaveAs("reflectionEffect.docx");
Imports IronWord
Imports IronWord.Models

' Create new Word document
Dim doc As New WordDocument()

' Create and configure text style
Dim textStyle As New TextStyle()
textStyle.TextEffect = New TextEffect() With {
    .ReflectionEffect = New Reflection()
}

' Create paragraph
Dim paragraph As New Paragraph()

' Create run with text and style
Dim textRun As New Run(New TextContent("Hello World"))
textRun.Style = textStyle

' Add run to paragraph
paragraph.AddChild(textRun)

' Add paragraph to document
doc.AddParagraph(paragraph)

' Export new Word document
doc.SaveAs("reflectionEffect.docx")
NuGet Download
PM > Install-Package IronWord
반사 효과 추가

반사 효과 추가

반사 효과를 사용하여 텍스트 만들기

반사 효과는 텍스트 아래에 거울처럼 반사된 이미지를 추가하여 세련되고 현대적인 느낌을 연출합니다. IronWord에서는 이 효과가 TextEffect 객체의 ReflectionEffect 속성을 통해 적용됩니다. 이 속성은 기본 설정으로 사용하거나 사용자 정의할 수 있습니다.

반사 효과를 구현하려면 TextStyle를 생성하고 TextEffect 속성을 Reflection 인스턴스로 구성합니다. Reflection 클래스는 대부분의 사용 사례에 적합한 표준 반사 매개변수를 적용하는 기본 초기화를 지원합니다. 사용자 지정 반사의 경우 거리, 흐림 정도, 투명도와 같은 속성을 조정하여 모양을 세밀하게 조정할 수 있습니다.

텍스트 스타일을 정의한 후, Run을 생성하고 여기에 TextContent을 포함한 후 구성된 스타일을 실행에 할당합니다. AddChild을(를) 사용하여 단락에 실행(run)을 추가하고, 문서의 적절한 계층 구조인 Document → Paragraph → Run → TextContent를 유지하세요. 마지막으로, 반사 효과를 적용하려면 해당 단락을 문서에 추가하세요.

코드 설명

새 워드 문서를 만들고 텍스트에 반사 효과를 추가해 보겠습니다. 처음에 새로운 WordDocument 객체인 doc가 생성됩니다. TextStyle 객체는 TextEffect 속성을 새로운 Reflection 객체로 설정하여 반사 효과를 포함하도록 인스턴스화되고 구성됩니다.

반사 효과가 있는 스타일 텍스트를 추가하려면, Paragraph을(를) 생성하고, "Hello World"와 함께 TextContent을 포함하는 Run 객체를 생성합니다. TextStyle는 반사 효과를 적용하여 Run에 할당됩니다. RunParagraphAddChild를 사용하여 추가되며, Paragraph는 문서에 추가됩니다. 이는 문서 계층 구조(문서 → 단락 → 실행 → 텍스트 콘텐츠)를 따릅니다. 마지막으로 문서가 저장됩니다.

IronWord 튜토리얼에서 문서 요소를 살펴보세요.
GitHub에서 보기

시작할 준비 되셨나요?

Nuget Downloads 56,401버전:2026.9방금 출시

Key in blue circle

무료 30일 체험 키를 즉시 받으세요.

Your trial license will be sent to your email address

제한 없음. 100% 무제한 이용. 신용카드 불필요.

bullet_checked신용카드나 계정 생성은 필요하지 않습니다.제한 없음. 100% 무제한 이용. 신용카드 불필요.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
무료 라이브 데모를 예약하세요
Booking Badge

전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.

Iron Software의 고객 로고
부담 없는 무료 상담을 받아보세요
아래 양식을 작성하시거나 sales@ironsoftware.com으로 이메일을 보내주세요.
고객님의 정보는 항상 비밀로 유지됩니다.
전 세계 수백만 엔지니어들이 신뢰하는 제품입니다.
Iron Software의 고객 로고
지금 바로 30일 무료 체험판 키를 받으세요.
신용카드나 계정 생성은 필요하지 않습니다.