mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@5606 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
16c38dbc00
commit
4d2c1b3bd7
4 changed files with 17 additions and 12 deletions
|
|
@ -1,5 +1,6 @@
|
|||
uses
|
||||
PdfDraw;
|
||||
PdfDraw,
|
||||
Painter;
|
||||
|
||||
file
|
||||
main.cpp,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#ifndef _PDF_icpp_init_stub
|
||||
#define _PDF_icpp_init_stub
|
||||
#include "PdfDraw/init"
|
||||
#include "Painter/init"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ CONSOLE_APP_MAIN
|
|||
pdf.DrawText(100, 100, "Ahoj", Courier(100).Bold(), Black);
|
||||
#else
|
||||
int cy = 0;
|
||||
int height = 50;
|
||||
for(int face = Font::SERIF; face < min(10, Font::GetFaceCount()); face++)
|
||||
// for(int face = Font::SERIF; face < min(99999, Font::GetFaceCount()); face++)
|
||||
int face = 6;
|
||||
for(int underline = 0; underline < 2; underline++)
|
||||
for(int italic = 0; italic < 2; italic++)
|
||||
for(int bold = 0; bold < 2; bold++) {
|
||||
|
|
@ -25,16 +25,19 @@ CONSOLE_APP_MAIN
|
|||
h << " italic";
|
||||
if(underline)
|
||||
h << " underline";
|
||||
Font fnt(face, height);
|
||||
Font fnt(face, 50);
|
||||
fnt.Bold(bold).Italic(italic).Underline(underline);
|
||||
Cout() << fnt << "\n";
|
||||
pdf.DrawText(100, cy, fnt.GetFaceName() + h, fnt, Black);
|
||||
// pdf.DrawText(2000, cy, 200, fnt.GetFaceName() + h, fnt, Black);
|
||||
cy += height;
|
||||
if(cy > 6000) {
|
||||
pdf.EndPage();
|
||||
pdf.StartPage();
|
||||
cy = 0;
|
||||
LOG(face << ' ' << fnt << ", TTF: " << fnt.IsTrueType());
|
||||
if(1 || fnt.IsTrueType()) {
|
||||
pdf.DrawText(100, cy, fnt.GetFaceName() + h, fnt, Black);
|
||||
// pdf.DrawText(2000, cy, 200, fnt.GetFaceName() + h, fnt, Black);
|
||||
cy += fnt.GetLineHeight();
|
||||
if(cy > 6000) {
|
||||
pdf.EndPage();
|
||||
pdf.StartPage();
|
||||
cy = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ GUI_APP_MAIN
|
|||
// PromptOK("[H20L1 &&&");
|
||||
|
||||
RichEditWithToolBar e;
|
||||
e.SetPage(Size(6074, 3968));
|
||||
// e.SetPage(Size(6074, 3968));
|
||||
Vector<int> h;
|
||||
for(int i = 1; i < Font::GetFaceCount(); i++)
|
||||
if((Font::GetFaceInfo(i) & Font::SCALEABLE) && !(Font::GetFaceInfo(i) & Font::SPECIAL))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue