Page 1 of 2
Defline(style,pix) to 2DDrawing-Library
Posted: Sat Oct 04, 2003 1:10 pm
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

____________________________________________________________________________
In GFA-basic i can do that you can see here:
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
Posted: Sat Oct 04, 2003 4:10 pm
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).
Posted: Sat Oct 04, 2003 4:38 pm
by J-The-Grey
I think that this would be a nice and useful addition!
Posted: Sun Oct 05, 2003 1:02 pm
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
Posted: Sun Oct 05, 2003 2:35 pm
by blueznl
the more former gfa users the merrier!

Posted: Sun Oct 05, 2003 3:37 pm
by Fred
It's a GFA invasion !
Ok for this command, I put it in the TODO list...
Posted: Sun Oct 05, 2003 6:33 pm
by Berikco
Fred wrote:It's a GFA invasion !
Seems so...
Must be because i did such a bad job as GB32 betatester.....always lazy....now GFA is gone

Posted: Sun Oct 05, 2003 7:35 pm
by freak
lol
We must make sure, you don't do any more betatests for PureBasic...
what's GB32 btw?
Timo
Posted: Sun Oct 05, 2003 7:59 pm
by Berikco
freak wrote:what's GB32 btw?
GFA Basic 32
There is also GFA Basic 16 bit win 3.11 version
Posted: Sun Oct 05, 2003 10:10 pm
by Falko
Thanks at Fred and all here.
Many greetings from Germany.
Falko
Posted: Sun Oct 05, 2003 10:35 pm
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?)
Posted: Mon Oct 06, 2003 2:40 pm
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.
Thanks at Fred

Re: Defline(style,pix) to 2DDrawing-Library
Posted: Tue Oct 07, 2003 1:09 am
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)
Posted: Tue Oct 07, 2003 4:50 pm
by Falko
Hello einander
youre source ist very small and very good.
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.

Posted: Thu Feb 23, 2006 11:04 am
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