Defline(style,pix) to 2DDrawing-Library

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Defline(style,pix) to 2DDrawing-Library

Post by Falko »

Hi

The command of Line() or LineXY() in Purebasic is good. But where can i do pixel or styles for this line?

I will make big lines (1,2.. Pixel) etc. for Vector Corel or CAD.

@Fred: It is very good when you can make commands Defline(style,pix) in
purebasic 2DDraw-Library, please.

Thanks all here, and sorry for my little english. :?

greathing Falko 8)
____________________________________________________________________________


In GFA-basic i can do that you can see here:

Image

And here my GFA-source:

Code: Select all

OpenW Top 1, 100, 100, 200, 300
AutoRedraw = 1
DefLine PS_SOLID, 15
Line 10, 10, 100, 100
DefLine PS_SOLID, 3
Color RGB(255, 0, 0)
Line 100, 100, 100, 200
DefLine PS_SOLID, 10
Color RGB(0, 255, 0)
Line 100, 200, 10, 100
Color RGB(255, 0, 100)
DefLine PS_DASH, 1
Line 10, 230, 150, 230
DefLine PS_DASHDOTDOT, 1
Line 10, 240, 150, 240
DefLine PS_DOT, 1
Line 10, 250, 150, 250
Last edited by Falko on Wed Mar 30, 2005 9:27 pm, edited 5 times in total.
www.falko-pure.de
Win11 Pro 64-Bit, PB_6.11b1
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2137
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Post by Andre »

A new Defline command is one option, extending the existing commands with a new optional parameter is another one.

But is makes really sense to enhance the 2DDrawing commands (several users on german forum are reqesting this feature).
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
J-The-Grey
User
User
Posts: 21
Joined: Fri Apr 25, 2003 6:16 pm
Location: Germany

Post by J-The-Grey »

I think that this would be a nice and useful addition!
iMac CoreDuo, MacBook C2D, OSX 10.5.5
PureBasic owner since V1.0 for Amiga
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Post by Falko »

Sorry,

here is a link to german forum and sorry i can't do translate all this but
you can see the Purbasic - API - Code from GPI. It's not complete the same as GFA-CODE but this doing the same color, style, and pixel to lines etc.

http://robsite.de/php/pureboard/viewtopic.php?t=2439
www.falko-pure.de
Win11 Pro 64-Bit, PB_6.11b1
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

the more former gfa users the merrier! :-)
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

It's a GFA invasion ! :lol:

Ok for this command, I put it in the TODO list...
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

Fred wrote:It's a GFA invasion ! :lol:
Seems so...

Must be because i did such a bad job as GB32 betatester.....always lazy....now GFA is gone :twisted:
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

lol :lol:

We must make sure, you don't do any more betatests for PureBasic...

what's GB32 btw?

Timo
quidquid Latine dictum sit altum videtur
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

freak wrote:what's GB32 btw?
GFA Basic 32
There is also GFA Basic 16 bit win 3.11 version
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Post by Falko »

Thanks at Fred and all here. :D
Many greetings from Germany.

Falko
www.falko-pure.de
Win11 Pro 64-Bit, PB_6.11b1
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

we should arrange an old manual of gfabasic (16 bits version) for fred so he has a printed todo list :)

(seriously, fred, did you ever have a look at gfabasic?)
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Post by Falko »

Why not?

GFA exists only in the InterNet. One hears nothing more of those since here 2002. :(
http://www.gfasoft.gfa.net/de/index.htm

However Purebasic lives on and becomes ever better. :D

Thanks at Fred :wink:
www.falko-pure.de
Win11 Pro 64-Bit, PB_6.11b1
User avatar
einander
Enthusiast
Enthusiast
Posts: 744
Joined: Thu Jun 26, 2003 2:09 am
Location: Spain (Galicia)

Re: Defline(style,pix) to 2DDrawing-Library

Post by einander »

Falko:

Here is a proc I'm using to do deflines in PB:

Code: Select all

Procedure Lin(x,y,x1,y1,Width,Color)
   hDC=GETDC_(WindowID())
   pen=CreatePen_(#Ps_Solid,Width,color)  
   hPenOld=SelectObject_(hDC,pen)
   MoveToEx_(hDC,x,y,0):LineTo_(hDC,x1,y1) 
   DeleteObject_(pen)
   DeleteObject_(hPenOld)
EndProcedure

_____________________________________________
_X=GetSystemMetrics_(#SM_CXSCREEN)-8 : _Y=GetSystemMetrics_(#SM_CYSCREEN)-68
OpenWindow(0,0,0,_X,_Y,#WS_OVERLAPPEDWINDOW | #WS_MAXIMIZE,"")

lin(50,200,300,400,15,#red)
MessageRequester("","DONE",0)
Falko wrote:
The command of Line() or LineXY() in Purebasic is good. But where can i do pixel or styles for this line?
You can also change the style with #Ps_dash, #Ps_dot, #Ps_dashdotdot, but only when the pen width equals 1.
Greetings from Spain
Einander
(Another GFA Invader)
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Post by Falko »

Hello einander
youre source ist very small and very good. :D


You are right one can nearly everything with the API in Purebasic manufacture, and one needs it again and again. With a Purebasic command one comes simply and faster to the goal. Why is one to always again invent it if the same at the end to be is?

Greetings from Germany, Falko
__________________________________
(GFA-Basic 32-Bit GB32 V.2.3 and Purebasic V3.8)
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Post by Michael Vogel »

Falko wrote: You are right one can nearly everything with the API in Purebasic manufacture, and one needs it again and again. With a Purebasic command one comes simply and faster to the goal. Why is one to always again invent it if the same at the end to be is?
Be on your side, not only the API gives us commands and functions we need day by day, also simple math (inc, dec, pred, succ, min, max, scale,...) and other cool things are useful.

It's clear, not everything can be implemented, but maybe a wish list (in excel or whatever) could be created, which can be expanded by all users.

It would have to include (at least) suggested values for:

Code: Select all

categorie   integer math
type        function
name        imin
parameter   .w,.w
returns     .w
description returns smallest of two integer values
rating      useful
Post Reply