For a very simple program that draws AutoCAD patterns (.pat files) I need new drawing functions, in C++. What i need is a C++ function that do all the work of drawing a set of parallel lines, given a point and an angle. The lines must be hatched (with segments/points of different length) as in DWG patterns.
For sample, i want to call:
DrawParallesLines(DRAWING_CANVAS, double x, double y, double angle, double hatches[], double deltax, double deltay);
This function should draw a line passing for (x,y), with angle provided and using segment lengths in the hatches array (negative length are for invisible segments); first segment should start from the point given and a distance along the line defined by deltax. The function must draw all lines parallel to those given that are contained in DRAWING_CANVAS, each line have a distance of deltay from the base one.
Even if base point is outside DRAWING_CANVAS, this must be filled with the parallel hatched lines. Hatches segments must also fill any line in both directions.
I need a robust and fast function, that draw exactly the segments contained in DRAWING_CANVAS. I consider the project completed only if i can see a correct preview of any normal pattern (.pat files), with various hatches styles, various angle and so on.
DRAWING_CANVAS could be any object you're confortable to use, for drawing. On windows, you can use an handle of a GDI canvas, for sample, or a TCanvas of C++ Builder or any surface you like (OpenGL and so on). What's important is that i get a set of line() commands, inside your function, that draw the hatched lines that i need, it's my problem to convert your code to me needings. If you like just to compute a give me back an array of segments (x,y)-(x',y') without any drawing function, for me is ok.
All rights to source code must be given to me. Don't use any free/open source code.
Hi. I'm an experienced C programmer who has worked on Windoes GUI programming using Win32. I have recently worked on a program which reads coordinates from a .csv file and plots them as a line graph and as a histogram. I can send you the executable if you are interested. I used GDI to draw lines and rectangles on a simple Static control. Please feel free to contact me. Thanks.
€250 EUR in 10 Tagen
4,9 (16 Bewertungen)
3,5
3,5
2 Freelancer bieten im Durchschnitt €225 EUR für diesen Auftrag