Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's 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 its 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

brianrhgbrianrhg Posts: 3Member
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.
thanks
brian
program chyeah (input,output);
uses
wincrt;
type
thandle=word;
hbitmap=thandle;
tcolorref=longint;
hpen=thandle;


function CreateBitmap(Width, Height:integer; Planes,Bitcount:byte; Bits:pointer): Hbitmap;

begin

end;

function CreatePen(penstyle, width:integer; color:tcolorref):hpen;
begin

end;


begin
CreateBitmap(10,10,1,1,NIL);
CreatePen(PS_SOLID 0,1,black);
readln;
end.

Comments

  • Phat NatPhat Nat Posts: 757Member
    : 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.
    : thanks
    : brian
    : program chyeah (input,output);
    : uses
    : wincrt;
    : type
    : thandle=word;
    : hbitmap=thandle;
    : tcolorref=longint;
    : hpen=thandle;
    :
    :
    : function CreateBitmap(Width, Height:integer; Planes,Bitcount:byte; Bits:pointer): Hbitmap;
    :
    : begin
    :
    : end;
    :
    : function CreatePen(penstyle, width:integer; color:tcolorref):hpen;
    : begin
    :
    : end;
    :
    :
    : begin
    : CreateBitmap(10,10,1,1,NIL);
    : CreatePen(PS_SOLID 0,1,black);
    : readln;
    : end.

    Sorry if you don't get any responses, we are reading your posts, but most of us here use TP for Dos and don't work with TPW.

    Phat Nat

Sign In or Register to comment.