ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!

Jump to content



Photo

[TUT] Delphi Graphic Tutorials


  • Please log in to reply
[TUT] Delphi Graphic Tutorials

#1

Mansherry
Mansherry
    Offline
    20
    Rep
    377
    Likes

    ♥♥ Everlasting love ♣♣

Posts: 180
Threads: 22
Joined: Nov 27, 2015
Credits: 0

Eight years registered
#1
Firstly open a form and add image and button on the form. 
1. First we will draw a single line on the image. To draw a line delphi needs two points from us.
we give the first point of the line with the command "MoveTo". We will use the start of the image max left,max up which means 0,0 parametars of X and Y. If we want to go down we increse the X and if we want to go right we increse Y.
Click twice on the button or go into OnClick button event(its same) and write this:
 
Hidden Content
You'll be able to see the hidden content once you reply to this topic or

Please Login or Register to see this Hidden Content

.
 
Next we need the secound point which we give with the command "LineTo".Same like the MoveTo command it needs two values (X,Y). We will use the middle of the image, so we will find the middle of the image if we split the Width and the Height of the image on 2.
so the next code will be :
 
Hidden Content
You'll be able to see the hidden content once you reply to this topic or

Please Login or Register to see this Hidden Content

.
 
if we want to countinue from the place we stoped the first line now we just use line to otherways we have set the new start point with move to
 
notice the difference between :
 
Hidden Content
You'll be able to see the hidden content once you reply to this topic or

Please Login or Register to see this Hidden Content

.

 

and:

 

Hidden Content
You'll be able to see the hidden content once you reply to this topic or

Please Login or Register to see this Hidden Content

.

 

 
on the first image we countinue the secound line from the place we finished the first and in the secound we set new starting point.
To change the line color use this code:
 
Hidden Content
You'll be able to see the hidden content once you reply to this topic or

Please Login or Register to see this Hidden Content

.
 
 
change the blue with the name of the color you want.
i should note now about the TPoint variables.
the Tpoint variables have 2 values x and y and they are very usefull for drawing.
 
I am really bored now i will continue tomorrow with expanding this tutorial with rectangels , ellipses etc.

 


  • 10

♥ My best friends: nympho ;♥ Mikajac;♥ Niemiau;♥  pruned_64285549 ;♥ pruned_62924432 ;♥ J0cker ♥

â™  MooMiku;â™  Dan;â™  BotOpâ™ Helios;â™  stefsot;â™  c3iL â™ 

♣♣ My accounts shop:♣♣ Click here

YjX81Ql.png

 


#2

pruned_9527622
pruned_9527622
    Offline
    13
    Rep
    28
    Likes

    Veteran

  • PipPipPipPipPipPipPip
Posts: 982
Threads: 4
Joined: Feb 04, 2015
Credits: 0

Eight years registered
#2

thx sir


  • 0

#3

Mansherry
Mansherry
    Offline
    20
    Rep
    377
    Likes

    ♥♥ Everlasting love ♣♣

Posts: 180
Threads: 22
Joined: Nov 27, 2015
Credits: 0

Eight years registered
#3

thx sir

np :wub:


  • 1

♥ My best friends: nympho ;♥ Mikajac;♥ Niemiau;♥  pruned_64285549 ;♥ pruned_62924432 ;♥ J0cker ♥

â™  MooMiku;â™  Dan;â™  BotOpâ™ Helios;â™  stefsot;â™  c3iL â™ 

♣♣ My accounts shop:♣♣ Click here

YjX81Ql.png

 


#4

vlobs3
vlobs3
    Offline
    0
    Rep
    0
    Likes

    Advanced Member

Posts: 94
Threads: 1
Joined: Dec 13, 2015
Credits: 0
Eight years registered
#4

ty


  • 0

#5

Mansherry
Mansherry
    Offline
    20
    Rep
    377
    Likes

    ♥♥ Everlasting love ♣♣

Posts: 180
Threads: 22
Joined: Nov 27, 2015
Credits: 0

Eight years registered
#5

ty

;) hope it is useful for you


  • 0

♥ My best friends: nympho ;♥ Mikajac;♥ Niemiau;♥  pruned_64285549 ;♥ pruned_62924432 ;♥ J0cker ♥

â™  MooMiku;â™  Dan;â™  BotOpâ™ Helios;â™  stefsot;â™  c3iL â™ 

♣♣ My accounts shop:♣♣ Click here

YjX81Ql.png

 


#6

UnitedComet
UnitedComet
    Offline
    0
    Rep
    0
    Likes

    Member

Posts: 56
Threads: 2
Joined: Dec 06, 2015
Credits: 0
Eight years registered
#6

Thank u )


  • 0

#7

pruned_3969092
pruned_3969092
    Offline
    0
    Rep
    0
    Likes

    Lurker

  • Pip
Posts: 1
Threads: 0
Joined: Nov 15, 2015
Credits: 0
Eight years registered
#7

its work?

 


  • 0

#8

pruned_25579329
pruned_25579329
    Offline
    0
    Rep
    -5
    Likes

    Advanced Member

  • PipPipPipPip
Posts: 79
Threads: 1
Joined: Oct 10, 2015
Credits: 0
Eight years registered
#8

thbk


  • 0

#9

SoloQMiiaDedos
SoloQMiiaDedos
    Offline
    0
    Rep
    5
    Likes

    New Member

Posts: 22
Threads: 0
Joined: Jan 13, 2016
Credits: 0
Eight years registered
#9

hmm


  • 0

#10

usr0
usr0
    Offline
    0
    Rep
    0
    Likes

    New Member

Posts: 19
Threads: 0
Joined: Jan 17, 2016
Credits: 0
Eight years registered
#10
no

  • 0


 Users browsing this thread: