## ffmpeg4iphone

### July 29, 2009

## Drawing thick lines with dot projection …

### July 21, 2009

`public void drawThickLine(Graphics g, int x1, int y1, int x2, int y2, int thickness) {`

// The thick line is in fact a filled polygon

int dX = x2 - x1;

int dY = y2 - y1;

// line length

double lineLength = Math.sqrt(dX * dX + dY * dY);

double scale = (double)(thickness) / (2 * lineLength);

```
``` // The x,y increments from an endpoint needed to create a rectangle...

double ddx = -scale * (double)dY;

double ddy = scale * (double)dX;

ddx += (ddx > 0) ? 0.5 : -0.5;

ddy += (ddy > 0) ? 0.5 : -0.5;

int dx = (int)ddx;

int dy = (int)ddy;

// Now we can compute the corner points...

int xPoints[] = new int[4];

int yPoints[] = new int[4];

xPoints[0] = x1 + dx; yPoints[0] = y1 + dy;

xPoints[1] = x1 - dx; yPoints[1] = y1 - dy;

xPoints[2] = x2 - dx; yPoints[2] = y2 - dy;

xPoints[3] = x2 + dx; yPoints[3] = y2 + dy;

` g.drawFilledPath(xPoints, yPoints, null, null);`

}

## Best VPS

### July 12, 2009

Free advertising ðŸ˜› but heck, I like these guys. I’m using 4 linodes now and find them to be the most reliable VPS out there. They have a great admin tool and have a bunch of extras like a DNS API etc.

Normally I don’t promote other people ( wow, that sounds back ) … but if ya do a good job then what the hey ðŸ˜›

## Firefox Proxy add-on

### July 9, 2009

When I’m travelling outside the old UK, I can use my local home proxy and firefox to keep up with the BBC.Â You can keep changing the proxy settings by hand, but I’ve found http://foxyproxy.mozdev.org/Â to be a pretty usefull pieces of kit …

## Quick conversions – starting with the A’s

### July 9, 2009

Just start to fill out some more tables for my online conversion tools – starting with some A’s

#*0.4047=Acres to hectares

#*43560=Acres to square feet

#*0.001562=Acres to square miles

#*4046.873=Acres to square metres

#*76=Atmospheres to cm of mercury

#*14.7=Atmospheres to pounds per square inch

#*1.058=Atmospheres to tons per square foot