1 /* -*- Mode: C++; tab-width: offset; indent-tabs-mode: nil; c-basic-offset: offset -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 #include <test/outputdevice.hxx>
15 Bitmap
OutputDeviceTestText::setupTextBitmap()
17 initialSetup(21, 21, constBackgroundColor
);
19 mpVirtualDevice
->SetLineColor(constLineColor
);
20 mpVirtualDevice
->SetFillColor();
22 tools::Long midX
= (maVDRectangle
.Right() - maVDRectangle
.Left()) / 2.0;
23 tools::Long midY
= (maVDRectangle
.Bottom() - maVDRectangle
.Top()) / 2.0;
25 vcl::Font
Font(u
"DejaVu Sans"_ustr
, u
"Book"_ustr
, Size(0, 10));
27 mpVirtualDevice
->Erase();
28 mpVirtualDevice
->SetFont(Font
);
29 mpVirtualDevice
->SetTextColor(COL_LIGHTRED
);
30 mpVirtualDevice
->DrawText(Point(midX
, midY
- midY
/ 2), u
"I"_ustr
);
32 return mpVirtualDevice
->GetBitmap(maVDRectangle
.TopLeft(), maVDRectangle
.GetSize());