Solved

I have problem about graphics in C++builder

Posted on 1999-01-21
2
167 Views
Last Modified: 2011-10-03
I want to know that I must be use command?. In access direct with pixel.
 I ever write Borland 3.1(DOS version). It have include file graphics.h just in this file have command
 getpixel or putpixel for access direct with pixel. Then in C++builder I can to use command?.
 instead of getpixel and putpixel.  
                 Please answer me because I will be graduate or not depend on your answer.
                         I'm senior engineering. I'm making my project.
                                   THANK YOU VERY MUCH    
0
Comment
Question by:thawatchai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 10

Accepted Solution

by:
viktornet earned 200 total points
ID: 1184820
Here is how it's done.... This is a simple example....

//Let's say this code goes under the Click of a button.....

for (int y = 0; y < Height; y++)
  for (int x = 0; x < Width; x++)
    Canvas->Pixels[y][x] = (TColor)RGB(x * y, y + x, x * y);

This is just a simple example that shows you how to access the pixels on the Form's canvas.....

-Viktor
--Ivanov
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1184821
If you need more help, let me know......
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question