mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Text annotations graphics
This commit is contained in:
@ -160,36 +160,42 @@ void PDFExamplesGenerator::generateAnnotationsExample()
|
||||
pdf::PDFObjectReference annotation = builder.createAnnotationSquare(page5, QRectF(50, 50, 50, 50), 3.0, Qt::green, Qt::red, "Title1", "Subject1", "Contents - green filling, red boundary");
|
||||
builder.setAnnotationBorderStyle(annotation, pdf::PDFAnnotationBorder::Style::Solid, 2.718);
|
||||
builder.setAnnotationColor(annotation, Qt::black);
|
||||
builder.updateAnnotationAppearanceStreams(annotation);
|
||||
}
|
||||
|
||||
{
|
||||
pdf::PDFObjectReference annotation = builder.createAnnotationSquare(page5, QRectF(50, 150, 50, 50), 3.0, Qt::green, Qt::red, "Title1", "Subject1", "Contents - green filling, red boundary");
|
||||
builder.setAnnotationBorderStyle(annotation, pdf::PDFAnnotationBorder::Style::Underline, 2.718);
|
||||
builder.setAnnotationColor(annotation, Qt::black);
|
||||
builder.updateAnnotationAppearanceStreams(annotation);
|
||||
}
|
||||
|
||||
{
|
||||
pdf::PDFObjectReference annotation = builder.createAnnotationSquare(page5, QRectF(50, 250, 50, 50), 3.0, Qt::green, Qt::red, "Title1", "Subject1", "Contents - green filling, red boundary");
|
||||
builder.setAnnotationBorderStyle(annotation, pdf::PDFAnnotationBorder::Style::Inset, 2.718);
|
||||
builder.setAnnotationColor(annotation, Qt::black);
|
||||
builder.updateAnnotationAppearanceStreams(annotation);
|
||||
}
|
||||
|
||||
{
|
||||
pdf::PDFObjectReference annotation = builder.createAnnotationSquare(page5, QRectF(150, 50, 50, 50), 3.0, Qt::green, Qt::red, "Title1", "Subject1", "Contents - green filling, red boundary");
|
||||
builder.setAnnotationBorderStyle(annotation, pdf::PDFAnnotationBorder::Style::Beveled, 2.718);
|
||||
builder.setAnnotationColor(annotation, Qt::black);
|
||||
builder.updateAnnotationAppearanceStreams(annotation);
|
||||
}
|
||||
|
||||
{
|
||||
pdf::PDFObjectReference annotation = builder.createAnnotationSquare(page5, QRectF(150, 150, 50, 50), 3.0, Qt::green, Qt::red, "Title1", "Subject1", "Contents - green filling, red boundary");
|
||||
builder.setAnnotationBorderStyle(annotation, pdf::PDFAnnotationBorder::Style::Dashed, 2.718);
|
||||
builder.setAnnotationColor(annotation, Qt::black);
|
||||
builder.updateAnnotationAppearanceStreams(annotation);
|
||||
}
|
||||
|
||||
{
|
||||
pdf::PDFObjectReference annotation = builder.createAnnotationSquare(page5, QRectF(150, 250, 50, 50), 3.0, Qt::green, Qt::red, "Title1", "Subject1", "Contents - green filling, red boundary");
|
||||
builder.setAnnotationBorder(annotation, 5.0, 3.0, 2.0);
|
||||
builder.setAnnotationColor(annotation, Qt::black);
|
||||
builder.updateAnnotationAppearanceStreams(annotation);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user