Page 1 sur 1

Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : ven. 23/oct./2015 15:14
par microdevweb
Logo Purebasic réalisé entièrement avec VectorDrawin (15 min +-), bon c'est pas le plus joli logo c'est juste une démonstration de la puissance de cette nouvelle lib.

Image

Code : Tout sélectionner

Enumeration 
      #MainForm
      #Img
      #MainImg
EndEnumeration
Procedure Draw()
      StartVectorDrawing(ImageVectorOutput(#Img))
      VectorSourceColor($FFFFFFFF)
      FillVectorOutput()
      ;{ Contour
      X=200
      Y=50
      MovePathCursor(X,Y)
      AddPathLine(350,30,#PB_Path_Relative)
      AddPathLine(-40,100,#PB_Path_Relative)
      AddPathLine(-25,0,#PB_Path_Relative)
      AddPathLine(-30,80,#PB_Path_Relative)
      AddPathLine(110,15,#PB_Path_Relative)
      AddPathLine(-40,110,#PB_Path_Relative)
      AddPathLine(-100,-10,#PB_Path_Relative)
      AddPathLine(-30,80,#PB_Path_Relative)
      AddPathLine(210,30,#PB_Path_Relative)
      AddPathLine(-40,80,#PB_Path_Relative)
      AddPathLine(-350,-40,#PB_Path_Relative)
      AddPathLine(70,-180,#PB_Path_Relative)
      AddPathLine(-100,-15,#PB_Path_Relative)
      AddPathLine(40,-110,#PB_Path_Relative)
      AddPathLine(100,15,#PB_Path_Relative)
      AddPathLine(30,-80,#PB_Path_Relative)
      AddPathLine(-180,-20,#PB_Path_Relative)
      AddPathLine(25,-85,#PB_Path_Relative)
      VectorSourceLinearGradient(200,50,800,600)
      VectorSourceGradientColor($FFFFFFFF,0.0)
      VectorSourceGradientColor($FF0000FF,0.2)
      VectorSourceGradientColor($FF2222B2,0.5)
      FillPath(#PB_Path_Preserve)
      VectorSourceColor($FF000080)
      StrokePath(2)
      ;}
      StopVectorDrawing()
EndProcedure
OpenWindow(#MainForm,0,0,800,600,"Logo Pb",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
CreateImage(#Img,800,600)
Draw()
ImageGadget(#MainImg,0,0,800,600,ImageID(#Img))
Repeat:Event=WaitWindowEvent():Until Event=#PB_Event_CloseWindow

Re: Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : ven. 23/oct./2015 15:23
par GG
Ca a de la gueule...

Re: Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : ven. 23/oct./2015 15:28
par microdevweb
Merci GG, mais il y moyen de faire beaucoup mieux. J'ai fais cela à la va-vite.

Re: Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : ven. 23/oct./2015 15:31
par Kwai chang caine
Super joli, c'est vrai pas beaucoup de monde a pensé à faire des codes autour du logo.

C'est un bon début, on se demande ou tu trouves le temps de faire tout ça, tu dors pas la nuit, ou alors peut être que t'es plusieurs.

Il te reste plus qu'à le faire tourner en 3d maintenant :mrgreen: :lol:

Re: Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : ven. 23/oct./2015 16:11
par Anonyme2
Kwai chang caine a écrit : tu dors pas la nuit, ou alors peut être que t'es plusieurs.
:mrgreen:

Re: Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : ven. 23/oct./2015 16:15
par GG
Il est multithreadé des pieds à la tête...

Re: Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : ven. 23/oct./2015 19:13
par nico
Petite modif pour donner un effet 3D

Code : Tout sélectionner

Procedure Draw()
  Static decalx.l =24
  Static decaly.l = 24
  
  StartVectorDrawing(ImageVectorOutput(#Img))
  
  VectorSourceColor($FFFFFFFF)
  FillVectorOutput()
  ;{ Contour
  For a = 1 To 24
    X=200 + decalx
    Y=50 + decaly
    MovePathCursor(X,Y)
    AddPathLine(350,30,#PB_Path_Relative)
    AddPathLine(-40,100,#PB_Path_Relative)
    AddPathLine(-25,0,#PB_Path_Relative)
    AddPathLine(-30,80,#PB_Path_Relative)
    AddPathLine(110,15,#PB_Path_Relative)
    AddPathLine(-40,110,#PB_Path_Relative)
    AddPathLine(-100,-10,#PB_Path_Relative)
    AddPathLine(-30,80,#PB_Path_Relative)
    AddPathLine(210,30,#PB_Path_Relative)
    AddPathLine(-40,80,#PB_Path_Relative)
    AddPathLine(-350,-40,#PB_Path_Relative)
    AddPathLine(70,-180,#PB_Path_Relative)
    AddPathLine(-100,-15,#PB_Path_Relative)
    AddPathLine(40,-110,#PB_Path_Relative)
    AddPathLine(100,15,#PB_Path_Relative)
    AddPathLine(30,-80,#PB_Path_Relative)
    AddPathLine(-180,-20,#PB_Path_Relative)
    AddPathLine(25,-85,#PB_Path_Relative)
    VectorSourceLinearGradient(200,50,800,600)
    VectorSourceGradientColor($FFFFFFFF,0.0)
    VectorSourceGradientColor($FF0000FF,0.2)
    VectorSourceGradientColor($FF2222B2,0.5)
    FillPath(#PB_Path_Preserve)
    VectorSourceColor($FF000080)
    StrokePath(2)
    ;}
    decalx = decalx - 1
    decaly = decaly - 1
  Next a
  StopVectorDrawing()
EndProcedure

Re: Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : ven. 23/oct./2015 19:36
par microdevweb
Ouiiiiiii joli Nico :wink:

Re: Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : ven. 23/oct./2015 22:05
par Kwai chang caine
Nico a écrit :Petite modif pour donner un effet 3D
Aaaah!!! tu vois DENIS qu'il est plusieurs :mrgreen:
Merci NICO 8)

Re: Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : sam. 24/oct./2015 0:12
par falsam
Jolis :wink: essais MicrodevWeb & Nico

Re: Logo Purebasic avec la nouvelle lib VectorDrawin

Publié : sam. 24/oct./2015 18:49
par Micheao
GG microdevweb