Re: [CsMain] What is the bare minimum to write a line of text?

Jim Sager <[email protected]>
Newsgroups gmane.comp.graphics.crystalspace.general
Message-ID <[email protected]>
I had the strangest bug in my code.
I have a class based g2d.  But when I assigned it in initialization, I wrote
csRef<iGraphics2D> g2d thus creating another instance of the variable and never assigning it.

I'm writing text out now :)

--- On Mon, 11/16/09, Jim Sager <[email protected]> wrote:

From: Jim Sager <[email protected]>
Subject: [CsMain] What is the bare minimum to write a line of text?
To: [email protected]
Date: Monday, November 16, 2009, 3:54 PM

Here is my code.

In initialization:

csRef<iFont> font;
iFontServer *fs;
fs=g2d->GetFontServer();
font=fs->LoadFont(CSFONT_LARGE,10);


Then where I am drawing 2d images:

csString text("test");
g2d->Write(font,0,700,255,-1,text,CS_WRITE_BASELINE); //This line crashes the program

I have a really cool project I'm writing.  It is basically a teleconferancing program to allow people to play old school pencil and paper RPGS with a live Game Master.  I can probably finish it in just a few months, but text is something I've never done before in CrystalSpace, so its hanging me up.




      
-----Inline Attachment Follows-----

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----Inline Attachment Follows-----

_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[email protected]?subject=unsubscribe

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[email protected]?subject=unsubscribe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.