from small one page howto to huge articles all in one place
 

search text in:





Poll
Which kernel version do you use?





poll results

Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs

words:

887

views:

194568

userrating:

average rating: 1.7 (102 votes) (1=very good 6=terrible)


May 25th. 2007:
Words

486

Views

251893

why adblockers are bad


Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

words:

161

views:

140714

userrating:

average rating: 1.4 (42 votes) (1=very good 6=terrible)


April, 26th. 2006:

Druckversion . pdf icon
You are here: Graphics->Gimp->creating an analog gauge image


Step 4:
Now its time to draw the lines marking 10,20,30...100%.
Pick the color with the hex value #fedcc1. Use a 1x1 brush.
First we need the coordinates of the outer pixel of those lines. For those who dont want to enter the sin and cos formula into the calculator can use the following small perl script:
#!/usr/bin/perl  
$maxdegree=246.0;
$startdegree=57.0;
$radius=60.0;
$centerX=65.0;
$centerY=60.0;
for ($i=0;$i<$maxdegree;$i+=$maxdegree/10)
{
print sin(($i+$startdegree)/180.0*3.14)*$radius+$centerX," ";
print cos(($i+$startdegree)/180.0*3.14)*$radius+$centerY,"\n";
}

Modfiy the variables at the beginning if you want to change something.

The script will produce 10 sets of coordinates, which will we will use the following way:

Go to the first coordinate pair, set a pixel.
hold down the shift key and draw a line to the center of the gauge (the cross). Only the outer pixel will be drawn.
Repeat the with the rest of the coordinates.
back





Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2020 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 17.3 ms