src/ptouch.c

changeset 21
629637abfe1f
parent 20
f8ca98e5f586
     1.1 diff -r f8ca98e5f586 -r 629637abfe1f src/ptouch.c
     1.2 --- a/src/ptouch.c	Thu Sep 24 22:29:12 2009 +0100
     1.3 +++ b/src/ptouch.c	Fri Sep 25 10:50:44 2009 +0100
     1.4 @@ -115,6 +115,10 @@
     1.5  	dev->phaseLo      = buf[21];
     1.6  	dev->notification = buf[22];
     1.7  
     1.8 +	// Set DPI
     1.9 +	dev->dpiPrinthead = 180;
    1.10 +	dev->dpiLabel     = 180;
    1.11 +
    1.12  	// Set pixel width (label width in pixels)
    1.13  	if (dev->mediaWidth >= 24) {
    1.14  		// Label tape is 24mm or wider. Print head is 128 dots at 180dpi,
    1.15 @@ -127,7 +131,7 @@
    1.16  		// floating point to convert from inches to mm. The -2 is a
    1.17  		// safety margin -- one pixel on either side of the label.
    1.18  		// This is far closer than Brother suggest, but hey-ho.
    1.19 -		dev->pixelWidth = ((dev->mediaWidth * 180 * 10) / 254) - 2;
    1.20 +		dev->pixelWidth = ((dev->mediaWidth * dev->dpiPrinthead * 10) / 254) - 2;
    1.21  	}
    1.22  
    1.23  	// Operation succeeded