Author: laplace Date: 2010-11-06 19:09:23 +0100 (Sat, 06 Nov 2010) New Revision: 39327 Changeset: http://dev.haiku-os.org/changeset/39327 Ticket: http://dev.haiku-os.org/ticket/6794 Modified: haiku/trunk/src/add-ons/print/drivers/gutenprint/GPCapabilityExtractor.cpp Log: * Workaround for ticket #6794. Libprint requires the horizontal and vertical resolution to be the same. For now use the maximum resolution when rendering the page bands. Modified: haiku/trunk/src/add-ons/print/drivers/gutenprint/GPCapabilityExtractor.cpp =================================================================== --- haiku/trunk/src/add-ons/print/drivers/gutenprint/GPCapabilityExtractor.cpp 2010-11-06 16:23:44 UTC (rev 39326) +++ haiku/trunk/src/add-ons/print/drivers/gutenprint/GPCapabilityExtractor.cpp 2010-11-06 18:09:23 UTC (rev 39327) @@ -155,6 +155,7 @@ { bool isDefault = fDefaultKey == key; BaseCap* capability; + int resolution; switch (fState) { case kExtractResolutionParameter: @@ -167,8 +168,12 @@ break; } + // TODO remove this workaround when libprint supports x != y too + // for now use the maximum resolution to render the page bands + resolution = max_c(x, y); + capability = new ResolutionCap(displayName, isDefault, fIndex, - x, y); + resolution, resolution); AddCapability(fCapabilities->fResolutions, capability, key); break;