Is there anyway to increase the text?
Example:
I want the "BlahBlahBlah" to be like size 24.Code:Cout << "BlahBlahBlah";
Printable View
Is there anyway to increase the text?
Example:
I want the "BlahBlahBlah" to be like size 24.Code:Cout << "BlahBlahBlah";
So you mean like:
Right?Code:for(int i = 0;i < 6;++i)
cout << "Blah";
wont that repeat blah 6 times? i want the size to increase.
Do you mean the size of the font in pixel height?
Yes i think thats what i'm looking for
That does increase the size. Are you saying you'd like to append spaces to the end of "BlahBlahBlah" to make it take up 24 characters? Say what you mean.
You can't modify the font of text in a console application.
like this blahblahblah
the text is bigger, okay then thanks.
I don't think that's possible in a console application, easy on win32 though
Okay thanks, dont no win32 yet.
Yes. It is possible. You can interface with the console to produce several types of fonts and sizes. I don't know how to do it though. Its definitely non portable. console.h and windows.h are probably needed for windows based systems.
But if what you want is to have on the same console session different fonts and sizes displayed at the same time, then you are in for a threat. You will need to enter graphics mode. Again, how this is done... I don't know.
I was assuming he only wanted a portion of text to be one size and the rest would be another size. I certainly wasn't going to try asking him to explain further ;)
Wow! What a wealth of info! I didn't know that, but now that I think about it it makes sense. I'm having visions of a program called 'Iris', which we used use in work to maintain till floats and whatnot in a small store i used work in, and I'm sure it was in gaudy colors with different size fonts.Quote:
Originally Posted by Mario F.
Getouttahere! :pQuote:
Originally Posted by twomers
If I knew how to do it... then I would strut some for you ;)
I'll leave that for the OP.
Right now I'm more interested on making PDCurses working for me :)
I found this on a web site, would this be the code that i could use?
Code:setcolor(YELLOW);
settextstyle(DEFAULT_FONT, HORIZ_DIR, 2); // 2 = size
outtextxy(20, 320, "Press any key ... ");
getch();
Code:// do some graphics using the WinBgi package from:
// http://csci.biola.edu/csci105/using_winbgi.html
//
// for Dev-C++ you need to fix graphics2.h and WinBgi2.cpp
// do change unsigned int getpixel() to int getpixel()
//
// have WinBgi2.cpp in the working folder and add to project
// have graphics2.h in the working folder
// link with libgdi32.a
// this Dev-C++ project is a Console Application
#include <cstdio>
#include <cmath>
#include "graphics2.h"
using namespace std;
int main()
{
int GraphDriver = 0, GraphMode = 0;
// create graph window frame
initgraph(&GraphDriver, &GraphMode, "", 640, 480);
// first draw two ellipses and a line ...
setcolor(CYAN);
setlinestyle(SOLID_LINE, 0, 2); // 2 pixels wide
//** ellipse(int x,int y,int sa,int ea,int rx,int ry)
//** center = x, y
//** sa = start of arc (0 to 360 degrees)
//** ea = end of arc
//** rx = length of horizontal axis (radius)
//** ry = length of vertical axis (radius)
ellipse(320, 150, 0, 360, 150, 20);
setcolor(LIGHTGREEN);
setlinestyle(SOLID_LINE, 0, 3); // 3 pixels wide
ellipse(320, 150, 0, 360, 40, 90);
setcolor(LIGHTRED);
setlinestyle(SOLID_LINE, 0, 2);
// line(int x1, int y1, int x2, int y2)
line(20, 300, 600, 300);
setcolor(YELLOW);
settextstyle(DEFAULT_FONT, HORIZ_DIR, 2);
outtextxy(20, 320, "Press any key ... ");
getch(); // wait
// now draw some fancy lines ...
int x, y;
int spokes = 6; // triangle = 3, more complex > 3
double radians;
setcolor(GREEN);
radians = 360 / (spokes * 57.29578);
for (x = 1; x <= spokes; x++)
{
for (y = x; y <= spokes; y++)
{
line((int)(sin(y * radians) * 225 + 320),(int)(cos(y * radians) * 145 + 150),
(int)(sin(x * radians) * 225 + 320),(int)(cos(x * radians) * 145 + 150));
}
}
outtextxy(20,320,"Press any key ... ");
getch(); // wait
closegraph();
return 0;
}
Does it have graphics2.h too? (I'm interested :) Thanks for posting!)
yes it does
Em, what site did you get it from (we need graphics2.h to work it ... ), or paste the header there too
Code:// do some graphics using the WinBgi package from:
// http://csci.biola.edu/csci105/using_winbgi.html
//
// for Dev-C++ you need to fix graphics2.h and WinBgi2.cpp
// do change unsigned int getpixel() to int getpixel()
//
// have WinBgi2.cpp in the working folder and add to project
// have graphics2.h in the working folder
// link with libgdi32.a
// this Dev-C++ project is a Console Application
<--------------------------------------
Nice arrow! Sometimes I need it for not seeing the obvious. It would have been better had you bolded it though :) I may have missed it again!
I cant seem to get it to work, i keep getting errors like
Quote:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Test\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Test\Makefile.win" all
g++.exe main.o -o "Project2.exe" -L"C:/Dev-Cpp/lib"
main.o(.text+0x61):main.cpp: undefined reference to `initgraph'
main.o(.text+0x6d):main.cpp: undefined reference to `setcolor'
main.o(.text+0x89):main.cpp: undefined reference to `setlinestyle'
main.o(.text+0xbd):main.cpp: undefined reference to `ellipse'
main.o(.text+0xc9):main.cpp: undefined reference to `setcolor'
main.o(.text+0xe5):main.cpp: undefined reference to `setlinestyle'
main.o(.text+0x119):main.cpp: undefined reference to `ellipse'
main.o(.text+0x125):main.cpp: undefined reference to `setcolor'
main.o(.text+0x141):main.cpp: undefined reference to `setlinestyle'
main.o(.text+0x165):main.cpp: undefined reference to `line'
main.o(.text+0x171):main.cpp: undefined reference to `setcolor'
main.o(.text+0x18d):main.cpp: undefined reference to `settextstyle'
main.o(.text+0x1a9):main.cpp: undefined reference to `outtextxy'
main.o(.text+0x1c1):main.cpp: undefined reference to `setcolor'
main.o(.text+0x2f4):main.cpp: undefined reference to `line'
main.o(.text+0x324):main.cpp: undefined reference to `outtextxy'
main.o(.text+0x32e):main.cpp: undefined reference to `closegraph'
collect2: ld returned 1 exit status
make.exe: *** [Project2.exe] Error 1
Execution terminated
Might be the cause of the problem...Quote:
// link with libgdi32.a
You need to link with the lib file provided.
Check the documentation. It will probably be called something like libbgi.a. It should be in your compiler's lib directory. The linker should have this library included.
Edit: Richie got me
Okay then, what i should have said was, how do you link.
whats your compiler?
Dev-C++ 4.9.9.2
Ah... then you don't want to use that one. You have http://www.codecutter.net/tools/winbgim/ that was built specificaly for MingW.
follow the instructions in the readme file