From 02e95bdba3e741959f73655950939f47e6ba98e5 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 13 Sep 2014 17:21:38 +0000 Subject: [PATCH] PNMTextMaker constructor should take FreetypeFont --- panda/src/pnmtext/pnmTextMaker.cxx | 17 +++++++++++++++-- panda/src/pnmtext/pnmTextMaker.h | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/panda/src/pnmtext/pnmTextMaker.cxx b/panda/src/pnmtext/pnmTextMaker.cxx index db727773ea..e48e9e0445 100644 --- a/panda/src/pnmtext/pnmTextMaker.cxx +++ b/panda/src/pnmtext/pnmTextMaker.cxx @@ -46,7 +46,7 @@ PNMTextMaker(const char *font_data, int data_length, int face_index) { //////////////////////////////////////////////////////////////////// // Function: PNMTextMaker::Copy Constructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMTextMaker:: PNMTextMaker(const PNMTextMaker ©) : @@ -59,10 +59,23 @@ PNMTextMaker(const PNMTextMaker ©) : { } +//////////////////////////////////////////////////////////////////// +// Function: PNMTextMaker::Copy Constructor +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +PNMTextMaker:: +PNMTextMaker(const FreetypeFont ©) : + FreetypeFont(copy), + _is_valid(true) +{ + initialize(); +} + //////////////////////////////////////////////////////////////////// // Function: PNMTextMaker::Destructor // Access: Public -// Description: +// Description: //////////////////////////////////////////////////////////////////// PNMTextMaker:: ~PNMTextMaker() { diff --git a/panda/src/pnmtext/pnmTextMaker.h b/panda/src/pnmtext/pnmTextMaker.h index 4f61b9b49a..e524465d27 100644 --- a/panda/src/pnmtext/pnmTextMaker.h +++ b/panda/src/pnmtext/pnmTextMaker.h @@ -41,6 +41,7 @@ PUBLISHED: PNMTextMaker(const Filename &font_filename, int face_index); PNMTextMaker(const char *font_data, int data_length, int face_index); PNMTextMaker(const PNMTextMaker ©); + PNMTextMaker(const FreetypeFont ©); ~PNMTextMaker(); enum Alignment {