Skip to content

Commit 144672f

Browse files
Merge pull request BRL-CAD#15 from SP23-CSCE482/fix-bugs
quick bug fixes
2 parents 870b531 + ca5ed6a commit 144672f

File tree

4 files changed

+3
-3
lines changed

4 files changed

+3
-3
lines changed

FactsHandler.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ void makeTopSection(IFPainter& img, InformationGatherer& info, int offsetX, int
66

77
//Draw text on top
88
std::string text = "Owner: " + info.getInfo("owner") + " Version: " + info.getInfo("version") + " Last Updated: " + info.getInfo("lastUpdate") + " Classification: " + info.getInfo("classification");
9-
img.drawText(offsetX + width / 100, offsetY + height / 1.5, width / 1500, width / 2000, text, false, true);
9+
img.drawText(offsetX + width / 100, offsetY + height / 1.5, width / 1500, width / 2000, text, false, true, false, 0);
1010
}
1111

1212
void makeBottomSection(IFPainter& img, InformationGatherer& info, int offsetX, int offsetY, int width, int height) {
@@ -15,7 +15,7 @@ void makeBottomSection(IFPainter& img, InformationGatherer& info, int offsetX, i
1515

1616
//Draw text on bottom
1717
std::string text = "Preparer: " + info.getInfo("preparer") + " Source File: " + info.getInfo("file") + " Date Generated: " + info.getInfo("dateGenerated") + " Model Checksum: " + info.getInfo("checksum");
18-
img.drawText(offsetX + width / 100, offsetY + height / 1.5, width / 1500, width / 2000, text, false, true);
18+
img.drawText(offsetX + width / 100, offsetY + height / 1.5, width / 1500, width / 2000, text, false, true, false, 0);
1919
}
2020

2121
void makeFileInfoSection(IFPainter& img, InformationGatherer& info, int offsetX, int offsetY, int width, int height) {

IFPainter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void IFPainter::drawImageFitted(int x, int y, int width, int height, std::string
8080
resized_image.copyTo(destRoi);
8181
}
8282

83-
void IFPainter::drawText(int x, int y, double fontSize, int font_weight, std::string text, bool italics, bool isWhite)
83+
void IFPainter::drawText(int x, int y, double fontSize, int font_weight, std::string text, bool italics, bool isWhite, bool centerText, int font)
8484
{
8585
// TODO: this
8686
// keep in mind that we'll need options for bold, italics, etc.

a.out

-41.5 KB
Binary file not shown.

output/m35_detailed.png

-2.55 KB
Loading

0 commit comments

Comments
 (0)