Solved

How can i print varios lines in a Canvas of form...

Posted on 1999-01-28
1
124 Views
Last Modified: 2010-05-18
How can i print varios lines in a Canvas of form for example:

i have the form, i determine the center of the form then the user want draw an polygon regular of 5 sides and with the lines drawed stared of the point center of the polygon to the vertices
Any idea?

atte kok77




 
0
Comment
Question by:jamiguel
1 Comment
 
LVL 17

Accepted Solution

by:
inthe earned 0 total points
Comment Utility
hi there ,
use the tpoint like so:
procedure TForm1.Button1Click(Sender: TObject);
var
    pts : array[0..3] of TPoint;
begin
    pts[0] := Point(100,100);
    pts[1] := Point(150,300);
    pts[2] := Point(200, 50);
    pts[3] := Point(250, 175);
PolyBezier(Canvas.Handle, pts, 4);
end;

this would draw a curve but just add amount of points to array
and plot your polygon with the starting point being the center of the canvas

Regards Barry.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now