C++ :: How To Make Colorful Text In Graphics Mode
Sep 14, 2013I needed to know if there is any possible way to make a colorful text in graphics mode
Like each letter will have different colors using setcolor(random(20));
I needed to know if there is any possible way to make a colorful text in graphics mode
Like each letter will have different colors using setcolor(random(20));
How to open a image in paint mode after that how to apply graphics to that opened image in paint mode.I am attached a image i want to draw a center line in that image..
Attached Images point1.jpg (12.9 KB)
I'm new to c++ So I have a project to make. I need to make a cursor like an arrow that will move when inputs are given. e.g if input is given 500 spaces UP it will move up and so on. it should rotate as well like 45 degrees and so on. how to make this arrow WITHOUT USING GRAPHICS.
View 2 Replies View RelatedLets say that I try and make a BASIC game with c++, how do I make the animations/graphics for the game (i.e the characters ) Do I need a specific complier/ide (I am using visual studio)
View 11 Replies View RelatedI have the code to make the text roll. But the problem is that the application can't execute other instructions coz its busy in the infinite loop of the marquee. How do i make the application to execute its normal instructions as well as roll the text simultaneously
View 7 Replies View RelatedHow would I make a game map in the console using text? The map is to be changed on a turn-based system. I've been thinking about using arrays.
View 1 Replies View RelatedI want to make a program that can know the current time and create a new .txt file.For example if its Monday to day then when its Tuesday it crates a new txt file called Tuesday.I really don't know how to go about this.I know i will need to use the time.h library.
View 4 Replies View RelatedI have to modify my output text file and convert every sentence into paragraph. I ran it its copying whole text but not paragraph after dots.
#include <iostream>
#include <string>
#include <fstream>
#include <cctype>
using namespace std;
void copyText(ifstream& intext, ofstream& outtext, char& ch);
[Code] .....
I want to make a string array from strings in a text file. Itry to do this but i couldn't do, where is my mistake?
Code:
#include <stdio.h>
#include <stdlib.h>
int main(){
char cumle[100],*c,*dene[50];
FILE *input;
input=fopen("input.txt","r");
[Code]...
I need to write a program to make the user input some text, and the first letter of each word has to be uppercase. (have to use while loops)
So for example lets say the user inputs:
i lOvE pRoGrAmMiNg
The output needs to be:
I Love Programming
Code: int main()
{
char c, lower_c;
printf("Enter Text");
while (c != '' && c >= 0)
{
if (c >= 'A' && c <= 'Z')
lower_c = c + 32;
else
lower_c = c;
[Code]...
I have started this code by making the letters lowercase (I don't know if this was the right way to approach this, ). I am not sure how proceed after this step, the step of making the first letter uppercase. (PS for the program, loops should be while loops)
I'm attempting to make a room file writer for text adventuring. I compartmentalized each variable for the stream, and dealth with the buffer over runs and all that. Now what I would like to do is make the "get_shdesc" function cut it's lines off at the last white space before it hits the 80th character and continue on the next line. I have no errors, and it functions properly so far.
1. Am I attacking this program in the proper manner so far?
2. If not, what should I be doing?
3. If so, what specifically should I read and study on to get the word wrap effect I am looking for.
My code thus far is:
#include <iostream>
#include <fstream>
#include <string>
#include <windows.h>
[Code]....
I need to write a C program to make the user input some text,and the first letter of each word has to be uppercase.(have to use while loops)So for example lets say the user inputs:
i lOvE pRoGrAmMiNg
The output needs to be:
I Love Programming
Code:
#include <stdio.h>
int main()
{
int i = 0;
char c, lower_c;
printf("Enter text
");
[code]....
I have started this code by making the letters lowercase.I am not sure how proceed after this step, the step of making the first letter uppercase.
I have started making a text adventure game.
if (Choice == 2) {
cout << "" << endl << "You follow the light to the end of the hallway, you find your self in a room" << endl
<< "with natural light coming from a hole in the ceiling." << endl << "" << endl << "You hear the door you just came through, slam behind you!" << endl << "" << endl
<< "There are three possible directions." << endl << "" << endl << "Do you:" << endl << "" << endl << "1) Go forward" << endl << "" << endl << "2) Go left" << endl
[Code] .....
Ignore the if (Choice == 2) at the beginning, that's linked to some previous code.
I want to make the player go back to the first bit of text but i'm not sure how to do this if they keep choosing to go back and forth from one location.
I first thought of doing it by just putting the text back in after they have chosen the option, but I can't do this infinite times.
So I've got a sensor (contains a gyroscope, accelerometer, and magnetometer) that outputs quaternion data. I'm looking to take that data and use it to display the rotation of my sensor in the form of some object on the screen. I've seen instances where programs use a cube, but I'm hoping to figure out a way to have a little more control over what the object I'm rendering is.
how to get started? Are there any software packages that might be able to accomplish this?
I use visual studio 2012. When I asked what I should use in order to put graphics into my program, I was told by the community that SFML works well. My only problem is that now I have SFML, where and how do I unpack it?
View 6 Replies View RelatedI have been learning Direct3D for a while now (DX11), and I ran into a bit of a dead end. I have Frank Luna's book on D3D programming, but I feel like I could find a better tutorial out there. I am at the point of writing the vertex shader (the first one he goes over)
Currently, I am using .fx files to write the shaders. Is that right?
How do I use 3D graphics .obj files created with UDK in a C++ project?
View 1 Replies View RelatedI am new to grpahics progamming in/under Borland C. I have included the "graphics.h" header file but i am unable to take input on the screen. If I try to move my cursor to a specified position using gotoxy() function the pointer doesnt moves to the specified location and starts taking input at (1,1) coordinate.
View 1 Replies View RelatedI need to create a program which could create text files of the bits stored in avi file/binary file. My first requirement is to show 0s and 1s in the text representation . My second requirement is to create an avi file from this text file. I have tried few codings but either they give me error or they not playing the reconverted binary files.
View 6 Replies View RelatedLooking for the binary search program using c Graphics....
View 5 Replies View RelatedI am trying to produce a image using GD graphics library. I can succesfully display my image, however I cant display this image along with a printf function too?
Code:
#include <stdio.h>
#include <gd.h>
int display_picture()
{
gdImagePtr gdImage = gdImageCreate( 50, 50 );
FILE *jpgFile = NULL;
[Code] ....
The picture displays but not hello.
Ive been experimenting with 3d graphics by using SDL only and lines to draw 3d shapes (no OpenGL or extension libraries, just pure math),
Ive used this page mainly to guide me on perspective projection but i have no luck [URL] ....
Ive been trying to draw a cube, but instead it gives me a mirrored dual triangular pyramids
This code here rotates the object as seen from the equations in this link: [URL] ....
double aX, aY, aZ;
for ( i = 0; i < model->qLength; i++ ) {
for ( j = 0; j < 4; j++ ) {
aX = model->quadArr[i].pointArr[j].x;
aY = model->quadArr[i].pointArr[j].y;
aZ = model->quadArr[i].pointArr[j].z;
[Code] .....
generally, i project it onto a 2d plane using: [URL] .....
double dx, dy, dz, dX, dY, dZ;
int bx, by, bX, bY;
for ( i = 0; i < model->qLength; i++ ) {
for ( j = 0; j < 4; j++ ) {
[Code] .....
I understand that my code is very messy and unoptimized, but im just concentrating on getting the core concepts to work with my code
I'm trying to create a GUI with Open graphics Libraries.I have made a basic GUI that exits the program or shows the instructions if a option/Polygon is marked (A bigger one is behind them)But what I'm trying to do now is the following:
0. Start the direct access on the desktop
1. Screen: Press any key to continue
2. Select one option
2.1 Option one: Go to the circuit selection menu
2.1 Option two: View the instructions (Cleared)
2.1 Option three: Exit the game (Cleared)
3. Select a circuit
4. Go to the car selection menu
5. Select a car and start the race
6. Pause menu if Spacebar has been pressed
From the pause menu:
6.1. Go to the main menu
6.2. Restart the race
6.3. Exit
I know that it is OpenGL, but what i'm looking for is C++.How I could do that? What I have cleared is with IF but I'm looking for better alternatives.
I'm trying to find the errors in my emulation of VGA VRAM concerning graphics modes.
(I'm testing it by doing plotting of all colors from x=0 to x=xsize-1 (where the color is relative, so 0=0 and xsize-1=maxcolor (in the case of 16 colors it's 15, etc.)))
VRAM Graphics management:
#include "headers/types.h" //Basic type support!
#include "headers/hardware/ports.h" //Basic PORT compatibility!
#include "headers/hardware/vga.h" //VGA data!
#include "headers/mmu/mmu.h" //For CPU passtrough!
#include "headers/hardware/vga_screen/vga_displaygeneration_crtcontroller.h" //For virtual width in bytes within VRAM!
[Code] .....
I have a college project which is a car racing game using C++ and the old-school graphics library BGI. After I draw the map and placed the objects(Car,obstacles,road's borders etc..)I added Sleep(); function to the function named Obstacles(); but the problem is, I can't move the car with the right&left arrows.a
Another problem,If I added a cleardevice(); command all objects disappears only the obstacles function keeps working. the Code is here:
char c;
do{
c = (char)getch();
if (c == KEY_LEFT) {
x = x - 10, x1 = x1 - 10;
} if (c == KEY_RIGHT) {
x = x + 10, x1 = x1 + 10;
[code].....
note: this is not the whole code, it's only a small portion of it, not a debugging question only need a hint how to fix it.
What i'm trying to do is load an image from my database create some graphics to it. probably just some lines and marks and save it back to my database. here's so far what I got.
for creating graphics:
} private void pictureBox3_MouseDown(object sender, MouseEventArgs e) {
draw = true;
} private void pictureBox3_MouseMove(object sender, MouseEventArgs e) {
if (draw) {
Graphics g = Graphics.FromImage(pictureBox3.Image);
[Code] ....
but the saving part doesnt work :( I think it only saves the image loaded to the picturebox but not the graphics created to it. how to merge it? i've tried to google it and found some sort of same cases but fails to make it work, something like converting it to bitmap.