Bump gutenprint version.

needs gutenprint8 packages to be uploaded.

Change-Id: I1204ff8b1bb85cc0eb615082b205280daabbc290
Signed-off-by: Augustin Cavalier <[email protected]>
This commit is contained in:
Jérôme Duval
2019-05-14 19:11:41 -04:00
committed by Augustin Cavalier
parent f95a6bc18a
commit 89f1fd6512
16 changed files with 58 additions and 63 deletions
+3 -3
View File
@@ -304,11 +304,11 @@ if [ IsPackageAvailable fontconfig_devel ] {
}
# Gutenprint
if [ IsPackageAvailable gutenprint_devel ] {
if [ IsPackageAvailable gutenprint8_devel ] {
ExtractBuildFeatureArchives gutenprint :
file: base gutenprint
file: base gutenprint8
runtime: lib
file: devel gutenprint_devel
file: devel gutenprint8_devel
depends: base
library: $(developLibDir)/libgutenprint.so
headers: $(developHeadersDir) $(developHeadersDir)/gutenprint
+5 -5
View File
@@ -48,16 +48,16 @@ protected:
virtual bool EndDocument(bool success);
void WriteSpoolData(const void* buffer, size_t size)
throw (TransportException);
/* throw (TransportException) */;
void WriteSpoolString(const char* buffer, ...)
throw (TransportException);
/* throw (TransportException) */;
void WriteSpoolChar(char c)
throw (TransportException);
/* throw (TransportException) */;
void ReadSpoolData(void* buffer, size_t size)
throw (TransportException);
/* throw (TransportException) */;
int ReadSpoolChar()
throw (TransportException);
/* throw (TransportException) */;
static void ConvertToRGB24(const void* src, void* dst, int width,
color_space cs);
+2 -2
View File
@@ -38,9 +38,9 @@ public:
~Transport();
void Write(const void *buffer, size_t size)
throw (TransportException);
/* throw (TransportException) */;
void Read(void *buffer, size_t size)
throw (TransportException);
/* throw (TransportException) */;
bool CheckAbort() const;
bool IsPrintToFileCanceled() const;
const string& LastError() const;
@@ -156,7 +156,6 @@ GPBinding::GetCapabilities(const char* driver, GPCapabilities* capabilities)
status_t
GPBinding::BeginJob(GPJobConfiguration* configuration,
OutputStream* outputStream)
throw(TransportException)
{
fOutputStream = outputStream;
fJob.SetApplicationName("Gutenprint");
@@ -168,7 +167,7 @@ GPBinding::BeginJob(GPJobConfiguration* configuration,
void
GPBinding::EndJob() throw(TransportException)
GPBinding::EndJob()
{
fJob.End();
fOutputStream = NULL;
@@ -176,13 +175,13 @@ GPBinding::EndJob() throw(TransportException)
void
GPBinding::BeginPage() throw(TransportException)
GPBinding::BeginPage()
{
}
void
GPBinding::EndPage() throw(TransportException)
GPBinding::EndPage()
{
status_t status = fJob.PrintPage(fBands);
DeleteBands();
@@ -44,10 +44,10 @@ public:
GPCapabilities* capabilities);
status_t BeginJob(GPJobConfiguration* configuration,
OutputStream* outputStream) throw(TransportException);
void EndJob() throw(TransportException);
void BeginPage() throw(TransportException);
void EndPage() throw(TransportException);
OutputStream* outputStream) /* throw(TransportException) */;
void EndJob() /* throw(TransportException) */;
void BeginPage() /* throw(TransportException) */;
void EndPage() /* throw(TransportException) */;
status_t AddBitmapToPage(BBitmap* bitmap, BRect validRect, BPoint where);
private:
@@ -37,7 +37,6 @@ GPDriver::GPDriver(BMessage* message, PrinterData* printerData,
void
GPDriver::Write(const void* buffer, size_t size)
throw (TransportException)
{
WriteSpoolData(buffer, size);
}
@@ -21,7 +21,7 @@ public:
const PrinterCap* printer_cap);
void Write(const void *buffer, size_t size)
throw(TransportException);
/* throw(TransportException) */;
protected:
bool StartDocument();
+27 -25
View File
@@ -30,32 +30,34 @@ public:
}
void ToGutenprint(int32 fromX, int32 fromY, int32& toX, int32& toY) {
void ToGutenprint(int32 fromX, int32 fromY, double& toX, double& toY) {
toX = fromX * kGutenprintUnit / fXDPI;
toY = fromY * kGutenprintUnit / fYDPI;
}
void ToGutenprintCeiling(int32 fromX, int32 fromY, int32& toX, int32& toY) {
void ToGutenprintCeiling(int32 fromX, int32 fromY, double& toX,
double& toY) {
toX = (fromX * kGutenprintUnit + fXDPI - 1) / fXDPI;
toY = (fromY * kGutenprintUnit + fYDPI - 1) / fYDPI;
}
void FromGutenprint(int32 fromX, int32 fromY, int32& toX, int32& toY) {
toX = fromX * fXDPI / kGutenprintUnit;
toY = fromY * fYDPI / kGutenprintUnit;
void FromGutenprint(double fromX, double fromY, int32& toX, int32& toY) {
toX = (int32)(fromX * fXDPI / kGutenprintUnit);
toY = (int32)(fromY * fYDPI / kGutenprintUnit);
}
void FromGutenprintCeiling(int32 fromX, int32 fromY, int32& toX, int32& toY) {
toX = (fromX * fXDPI + kGutenprintUnit - 1) / kGutenprintUnit;
toY = (fromY * fYDPI + kGutenprintUnit - 1) / kGutenprintUnit;
void FromGutenprintCeiling(double fromX, double fromY, int32& toX,
int32& toY) {
toX = (int32)((fromX * fXDPI + kGutenprintUnit - 1) / kGutenprintUnit);
toY = (int32)((fromY * fYDPI + kGutenprintUnit - 1) / kGutenprintUnit);
}
void SizeFromGutenprint(int32 fromWidth, int32 fromHeight,
void SizeFromGutenprint(double fromWidth, double fromHeight,
int32& toWidth, int32& toHeight) {
toWidth = fromWidth * fXDPI / kGutenprintUnit;
toHeight = fromHeight * fYDPI / kGutenprintUnit;
toWidth = (int32)(fromWidth * fXDPI / kGutenprintUnit);
toHeight = (int32)(fromHeight * fYDPI / kGutenprintUnit);
}
void RoundUpToWholeInches(int32& width, int32& height) {
@@ -66,8 +68,8 @@ public:
}
private:
int32 fXDPI;
int32 fYDPI;
double fXDPI;
double fYDPI;
};
@@ -239,18 +241,18 @@ GPJob::PrintPage(list<GPBand*>& bands) {
fBands = &bands;
fCachedBand = NULL;
Rectangle<int> imageableArea;
Rectangle<stp_dimension_t> imageableArea;
stp_get_imageable_area(fVariables, &imageableArea.left,
&imageableArea.right, &imageableArea.bottom, &imageableArea.top);
fprintf(stderr, "GPJob imageable area left %d, top %d, right %d, "
"bottom %d\n",
fprintf(stderr, "GPJob imageable area left %f, top %f, right %f, "
"bottom %f\n",
imageableArea.left, imageableArea.top, imageableArea.right,
imageableArea.bottom);
fprintf(stderr, "GPJob width %d %s, height %d %s\n",
fprintf(stderr, "GPJob width %f %s, height %f %s\n",
imageableArea.Width(),
imageableArea.Width() % 72 == 0 ? "whole inches" : "not whole inches",
std::fmod(imageableArea.Width(), 72.) == 0.0 ? "whole inches" : "not whole inches",
imageableArea.Height(),
imageableArea.Height() % 72 == 0 ? "whole inches" : "not whole inches"
std::fmod(imageableArea.Height(), 72.) == 0.0 ? "whole inches" : "not whole inches"
);
CoordinateSystem coordinateSystem;
@@ -286,16 +288,16 @@ GPJob::PrintPage(list<GPBand*>& bands) {
// calculate the position and size of the image to be printed on the page
// unit: 1/72 Inches
// constraints: the image must be inside the imageable area
int32 left;
int32 top;
double left;
double top;
coordinateSystem.ToGutenprint(fPrintRect.left, fPrintRect.top, left, top);
if (left < imageableArea.left)
left = imageableArea.left;
if (top < imageableArea.top)
top = imageableArea.top;
int32 right;
int32 bottom;
double right;
double bottom;
coordinateSystem.ToGutenprintCeiling(fPrintRect.right, fPrintRect.bottom,
right, bottom);
if (right > imageableArea.right)
@@ -303,8 +305,8 @@ GPJob::PrintPage(list<GPBand*>& bands) {
if (bottom > imageableArea.bottom)
bottom = imageableArea.bottom;
int32 width = right - left;
int32 height = bottom - top;
double width = right - left;
double height = bottom - top;
// because of rounding and clipping in the previous step,
// now the image frame has to be synchronized
@@ -203,12 +203,12 @@ GPParameterVisitor::VisitStringList(stp_parameter_t* parameter)
} else if (strcmp(name, kPageSize) == 0) {
stp_set_string_parameter(fVariables, kPageSize, key);
int width;
int height;
stp_dimension_t width;
stp_dimension_t height;
stp_get_media_size(fVariables, &width, &height);
BSize pageSize(width, height);
int left, right, top, bottom;
stp_dimension_t left, right, top, bottom;
stp_get_imageable_area(fVariables, &left, &right, &bottom, &top);
BRect imageableArea(left, top, right, bottom);
@@ -266,9 +266,9 @@ GPParameterVisitor::VisitDimensionParameter(stp_parameter_t* description,
{
const char* name = description->name;
const char* text = description->text;
int lower = description->bounds.dimension.lower;
int upper = description->bounds.dimension.upper;
int defaultValue = description->deflt.dimension;
double lower = description->bounds.dimension.lower;
double upper = description->bounds.dimension.upper;
double defaultValue = description->deflt.dimension;
if (lower <= defaultValue && defaultValue <= upper)
DimensionParameter(name, text, lower, upper, defaultValue,
parameterClass);
@@ -15,7 +15,7 @@ class OutputStream
{
public:
virtual void Write(const void *buffer, size_t size)
throw(TransportException) = 0;
/* throw(TransportException) */ = 0;
};
+1 -1
View File
@@ -77,7 +77,7 @@ requires {
lib:libexpat
#endif
#ifdef HAIKU_BUILD_FEATURE_SPARC_GUTENPRINT_ENABLED
lib:libgutenprint
lib:libgutenprint >= 8
#endif
#ifdef HAIKU_BUILD_FEATURE_SPARC_LIBICNS_ENABLED
lib:libicns
+1 -1
View File
@@ -78,7 +78,7 @@ requires {
lib:libexpat
#endif
#ifdef HAIKU_BUILD_FEATURE_X86_GUTENPRINT_ENABLED
lib:libgutenprint
lib:libgutenprint >= 8
#endif
#ifdef HAIKU_BUILD_FEATURE_X86_LIBICNS_ENABLED
lib:libicns
+1 -1
View File
@@ -77,7 +77,7 @@ requires {
lib:libexpat
#endif
#ifdef HAIKU_BUILD_FEATURE_X86_64_GUTENPRINT_ENABLED
lib:libgutenprint
lib:libgutenprint >= 8
#endif
#ifdef HAIKU_BUILD_FEATURE_X86_64_LIBICNS_ENABLED
lib:libicns
+1 -1
View File
@@ -78,7 +78,7 @@ requires {
lib:libexpat
#endif
#ifdef HAIKU_BUILD_FEATURE_X86_GCC2_GUTENPRINT_ENABLED
lib:libgutenprint
lib:libgutenprint >= 8
#endif
#ifdef HAIKU_BUILD_FEATURE_X86_GCC2_LIBICNS_ENABLED
lib:libicns
@@ -758,7 +758,6 @@ GraphicsDriver::EndDocument(bool)
void
GraphicsDriver::WriteSpoolData(const void* buffer, size_t size)
throw (TransportException)
{
if (fTransport == NULL)
return;
@@ -768,7 +767,6 @@ GraphicsDriver::WriteSpoolData(const void* buffer, size_t size)
void
GraphicsDriver::WriteSpoolString(const char* format, ...)
throw (TransportException)
{
if (fTransport == NULL)
return;
@@ -784,7 +782,6 @@ GraphicsDriver::WriteSpoolString(const char* format, ...)
void
GraphicsDriver::WriteSpoolChar(char c)
throw (TransportException)
{
if (fTransport == NULL)
return;
@@ -795,7 +792,6 @@ GraphicsDriver::WriteSpoolChar(char c)
void
GraphicsDriver::ReadSpoolData(void* buffer, size_t size)
throw (TransportException)
{
if (fTransport == NULL)
return;
@@ -805,7 +801,6 @@ GraphicsDriver::ReadSpoolData(void* buffer, size_t size)
int
GraphicsDriver::ReadSpoolChar()
throw (TransportException)
{
if (fTransport == NULL)
return -1;
+2 -2
View File
@@ -137,7 +137,7 @@ Transport::SetLastError(const char *e)
void
Transport::Write(const void* buffer, size_t size) throw(TransportException)
Transport::Write(const void* buffer, size_t size)
{
if (fDataStream) {
if (size == (size_t)fDataStream->Write(buffer, size)) {
@@ -150,7 +150,7 @@ Transport::Write(const void* buffer, size_t size) throw(TransportException)
void
Transport::Read(void* buffer, size_t size) throw(TransportException)
Transport::Read(void* buffer, size_t size)
{
if (fDataStream) {
if (size == (size_t)fDataStream->Read(buffer, size)) {