It is currently Wed Feb 19, 2020 12:30 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: [Module] DrawVectorEx - Module
PostPosted: Wed Jun 19, 2019 8:54 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1109
Location: Germany
DrawVectorEx - Module (all OS / 64Bit / DPI)

Simplified use of the VectorDrawing library

Image

Code:
; Draw::AlphaColor_()   - similar to RGBA()
; Draw::Box_()          - similar to Box()
; Draw::Circle_()       - similar to Circle()
; Draw::CircleArc_()    - draws a arc of a circle
; Draw::CircleSector_() - draws a circle sector
; Draw::Ellipse_()      - similar to Ellipse()
; Draw::EllipseArc_()   - draws a arc of a ellipse
; Draw::Font_()         - similar to DrawingFont()
; Draw::Line_()         - similar to Line()
; Draw::HLine_()        - draws a horizontal line
; Draw::VLine_()        - draws a vertical line
; Draw::LineXY_()       - similar to LineXY()
; Draw::MixColor_()     - mixes 2 colours in a mixing ratio of 1% - 99%
; Draw::SetStroke_()    - changes the stroke width
; Draw::StartVector_()  - similar to StartVectorDrawing()
; Draw::StopVector_()   - similar to StopVectorDrawing()
; Draw::Text_()         - similar to DrawText()
; Draw::TextHeight_()   - similar to TextHeight()
; Draw::TextWidth_()    - similar to TextWidth()

Download: DrawVectorExModule.pbi

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

[Windows 10 x64] [PB V5.7x]


Last edited by Thorsten1867 on Fri Dec 20, 2019 3:51 pm, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] DrawVectorEx - Module
PostPosted: Wed Jun 19, 2019 9:07 pm 
Offline
Moderator
Moderator
User avatar

Joined: Thu Dec 31, 2009 11:05 pm
Posts: 1110
Location: Gernsbach (Germany)
Very nice Image

_________________
ImageImageImageImage Image


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] DrawVectorEx - Module
PostPosted: Sat Nov 16, 2019 4:45 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3203
Location: Boston, MA
This is very helpful!
Wish I had it before so many code stumbles. :oops:
Some of the module elements are called often and should be Macro's.
Code:
  ;- ===========================================================================
  ;-   DeclareModule
  ;- ===========================================================================
  ;Declare.q AlphaColor_(Color.i, Alpha.i)
  ;Declare.q MixColor_(Color1.i, Color2.i, Factor.i=50)
  Macro dpiX(Num_i)
    DesktopScaledX(Num_i)
  EndMacro
  Macro dpiY(Num_i)
    DesktopScaledY(Num_i)
  EndMacro

  Macro AlphaColor_(Color_i, Alpha_i)
    RGBA(Red(Color_i), Green(Color_i), Blue(Color_i), Alpha_i)
  EndMacro
  Macro MixColor_(Color1_i, Color2_i, Factor_i=50)
    BlendColor_(Color1_i, Color2_i, Factor_i)
  EndMacro

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] DrawVectorEx - Module
PostPosted: Fri Dec 20, 2019 6:22 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5977
Location: Wales, UK
OMG - I have had so much trouble getting the Vector Lib to work in the real world, it just isn't intuitive. This Module is going to save my hair (whats left of it). :mrgreen:

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] DrawVectorEx - Module
PostPosted: Fri Dec 20, 2019 6:40 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Jul 07, 2018 6:50 pm
Posts: 118
Thorsten1867 wrote:

Isn't this link to Date64Module.pbi ?


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] DrawVectorEx - Module
PostPosted: Sat Dec 21, 2019 12:15 am 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5977
Location: Wales, UK
Everything wrote:
Isn't this link to Date64Module.pbi ?


It does, but via "Download of PureBasic - Modules" you will find all of Thorsten's Modules, including DrawVectorEx.

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] DrawVectorEx - Module
PostPosted: Sat Dec 21, 2019 12:24 am 
Offline
Enthusiast
Enthusiast

Joined: Sat Jul 07, 2018 6:50 pm
Posts: 118
IdeasVacuum wrote:
but via "Download of PureBasic - Modules" you will find all of Thorsten's Modules, including DrawVectorEx

Yes I know, just wanted to point out an error in the module link (just in case)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye