![]() |
drawLine()
PHP Code:
PHP Code:
The function will draw polygon from xy1 to xy2, thickness of the line is based on the 4th param (if layer is 4 or lower, it is given in tiles. If 5 or higher thickness is in pixels (This goes to coordinats to (xy1 and xy2)) A nifty little function that I thought I could share :) |
Hmm... does the thickness take into account the direction of the line? From reading it it doesn't seem it, maybe that'd be a good addition.
|
The fancy one you have should be drawline2(), and just have a simple drawline(x1, y1, x2, y2) like in Java and have setcolor() and stuff seperate :o
|
Quote:
It now works, but it makes some sharp corners: ..______ ./......../ /_____/ (Where you remove the dots (pm, this is a zoomed version of the line :p)) I could add some checking to see which direction it is going based on the gived coords tho.. |
I think Graal should have brush functionality much like C#. ;(
|
Quote:
|
Why will people do something like
PHP Code:
PHP Code:
|
Quote:
|
It's just a matter of preference.
|
showimg() = GS1 >:(
As far as I'm concerned considering the way you can use findimg(), I consider showimg() to just be a remnant of GS1 existing for compatibility. |
Quote:
Will probably start using findimg(). |
Quote:
|
I use showimg because it's shorter. If I'm going to be showing an image and change a lot about it though, I'll usually use findimg.
|
Quote:
Quote:
And, I find using findimg() easier to read and debug |
PHP Code:
|
All times are GMT +2. The time now is 02:55 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.