Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > Standard C, C++

Reply
 
LinkBack Thread Tools Display Modes
Old 05-31-2004, 02:35 PM   #1 (permalink)
helz
Registered User
 
helz's Avatar
 
Join Date: May 2004
Posts: 5
helz is on a distinguished road
Borland Turbo C++ 3 - graphics mode - outtext problem

currently doing an assigment for college, need to use graphics mode
I've got all that setup but as soon as I want to output text using:
outtext() there are problems...
spaces, special chars and numbers other than 0 are not displayed
properly.

Are there any methods to fix this?
I need to be able to change the color of the text and its
positioning.

Thanks in advance!
helz is offline   Reply With Quote
Old 06-22-2004, 08:33 AM   #2 (permalink)
aland
Registered User
 
Join Date: Jun 2004
Posts: 1
aland is on a distinguished road
Post A example

/* Draw X--Y */
/* Base Point is x,y */
/* X long is X_long */
/* Y long is Y_long */
/* j is: 0 x+ Y+ ; 1 x+- y+- */
/* */
void draw_XY(float x,float y,float X_long,float Y_long)
{
time_t t;
time(&t);
setcolor(GREEN);
settextstyle(5,HORIZ_DIR,2);
outtextxy(x+X_MOVE-10,y+Y_MOVE+3,"0,0");
outtextxy(15,10,"By:Aland WooSon");
outtextxy(15,25,"Made Date:1999,9,18");
setcolor(RED);
line(x * BIGGER+ X_MOVE ,y* BIGGER + Y_MOVE ,(x+X_long)* BIGGER + X_MOVE ,y* BIGGER + Y_MOVE );
/* Draw_X */
line(x * BIGGER+ X_MOVE ,(y+Y_long)* BIGGER+ Y_MOVE ,x* BIGGER + X_MOVE ,-(y+Y_long)* BIGGER + Y_MOVE );
/* Draw_Y */
setcolor(GREEN);
settextstyle(5,HORIZ_DIR,2);
outtextxy(15,430,"Use time:");
setcolor(WHITE);
outtextxy(90,430,ctime(&t));
rectangle(20,447,620,460);
outtextxy( 180, 450, "Esc aborts or press a key for next..." );
}
aland is offline   Reply With Quote
Old 06-22-2004, 11:41 AM   #3 (permalink)
helz
Registered User
 
helz's Avatar
 
Join Date: May 2004
Posts: 5
helz is on a distinguished road
i managed to fix it using the settextstyle like in your example, the default font didnt any other characters apart from letters.

thanks again
helz is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
c simple question problem with switch case if13121 Standard C, C++ 1 10-24-2004 10:43 PM
C problem saurabh1905 Standard C, C++ 2 06-11-2004 02:00 AM


All times are GMT -8. The time now is 02:34 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting