Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I need to be able to draw a diagonal line in pascal
Does anyone know how to accomlish this? I have been trying to use the polyline function, I think that in order to do that I need to declare a bitmap, and a pen. Pasted below is my program to do this, however it doesn't compile. It seemed to create the bitmap before I added the createpen section although I don't know of anyone way that I could check that. I would greatly appreciate any explanation of what I need to do.
program chyeah (input,output);
function CreateBitmap(Width, Height:integer; Planes,Bitcount:byte; Bits:pointer): Hbitmap;
function CreatePen(penstyle, width:integer; color:tcolorref):hpen;