瀏覽代碼

PNMTextMaker constructor should take FreetypeFont

rdb 11 年之前
父節點
當前提交
02e95bdba3
共有 2 個文件被更改,包括 16 次插入2 次删除
  1. 15 2
      panda/src/pnmtext/pnmTextMaker.cxx
  2. 1 0
      panda/src/pnmtext/pnmTextMaker.h

+ 15 - 2
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 &copy) :
@@ -59,10 +59,23 @@ PNMTextMaker(const PNMTextMaker &copy) :
 {
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: PNMTextMaker::Copy Constructor
+//       Access: Public
+//  Description:
+////////////////////////////////////////////////////////////////////
+PNMTextMaker::
+PNMTextMaker(const FreetypeFont &copy) :
+  FreetypeFont(copy),
+  _is_valid(true)
+{
+  initialize();
+}
+
 ////////////////////////////////////////////////////////////////////
 //     Function: PNMTextMaker::Destructor
 //       Access: Public
-//  Description: 
+//  Description:
 ////////////////////////////////////////////////////////////////////
 PNMTextMaker::
 ~PNMTextMaker() {

+ 1 - 0
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 &copy);
+  PNMTextMaker(const FreetypeFont &copy);
   ~PNMTextMaker();
 
   enum Alignment {