"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "base/gsdevmem.c" between
ghostscript-9.26.tar.xz and ghostscript-9.27.tar.xz

About: Ghostscript is an interpreter and rendering engine for the PostScript language and for PDF (GPL release).

gsdevmem.c  (ghostscript-9.26.tar.xz):gsdevmem.c  (ghostscript-9.27.tar.xz)
/* Copyright (C) 2001-2018 Artifex Software, Inc. /* Copyright (C) 2001-2019 Artifex Software, Inc.
All Rights Reserved. All Rights Reserved.
This software is provided AS-IS with no warranty, either express or This software is provided AS-IS with no warranty, either express or
implied. implied.
This software is distributed under license and may not be copied, This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms modified or distributed except as expressly authorized under the terms
of the license contained in the file LICENSE in this distribution. of the license contained in the file LICENSE in this distribution.
Refer to licensing information at http://www.artifex.com or contact Refer to licensing information at http://www.artifex.com or contact
skipping to change at line 44 skipping to change at line 44
bool word_oriented, bool page_device, gs_memory_t * mem) bool word_oriented, bool page_device, gs_memory_t * mem)
{ {
const gx_device_memory *proto_dev; const gx_device_memory *proto_dev;
int palette_count = colors_size; int palette_count = colors_size;
int num_components = 1; int num_components = 1;
int pcount; int pcount;
int bits_per_pixel; int bits_per_pixel;
float x_pixels_per_unit, y_pixels_per_unit; float x_pixels_per_unit, y_pixels_per_unit;
byte palette[256 * 3]; byte palette[256 * 3];
bool has_color; bool has_color;
int code;
gs_rect bbox;
bbox.p.x = 0;
bbox.p.y = 0;
bbox.q.x = width;
bbox.q.y = height;
code = gs_bbox_transform_inverse(&bbox, pmat, &bbox);
if (code < 0)
return code;
switch (colors_size) { switch (colors_size) {
case 3 * 2: case 3 * 2:
palette_count = 2; palette_count = 2;
num_components = 3; num_components = 3;
/* fall through */ /* fall through */
case 2: case 2:
bits_per_pixel = 1; bits_per_pixel = 1;
break; break;
case 3 * 4: case 3 * 4:
skipping to change at line 196 skipping to change at line 206
/* this is an external device */ /* this is an external device */
new_dev->retained = true; new_dev->retained = true;
rc_init(new_dev, new_dev->memory, 1); rc_init(new_dev, new_dev->memory, 1);
new_dev->initial_matrix = *pmat; new_dev->initial_matrix = *pmat;
new_dev->HWResolution[0] = fabs(x_pixels_per_unit) * 72; new_dev->HWResolution[0] = fabs(x_pixels_per_unit) * 72;
new_dev->HWResolution[1] = fabs(y_pixels_per_unit) * 72; new_dev->HWResolution[1] = fabs(y_pixels_per_unit) * 72;
gx_device_set_width_height((gx_device *) new_dev, width, height); gx_device_set_width_height((gx_device *) new_dev, width, height);
/* Set the ImagingBBox so we get a correct clipping region. */ /* Set the ImagingBBox so we get a correct clipping region. */
{ {
gs_rect bbox;
bbox.p.x = 0;
bbox.p.y = 0;
bbox.q.x = width;
bbox.q.y = height;
gs_bbox_transform_inverse(&bbox, pmat, &bbox);
new_dev->ImagingBBox[0] = bbox.p.x; new_dev->ImagingBBox[0] = bbox.p.x;
new_dev->ImagingBBox[1] = bbox.p.y; new_dev->ImagingBBox[1] = bbox.p.y;
new_dev->ImagingBBox[2] = bbox.q.x; new_dev->ImagingBBox[2] = bbox.q.x;
new_dev->ImagingBBox[3] = bbox.q.y; new_dev->ImagingBBox[3] = bbox.q.y;
new_dev->ImagingBBox_set = true; new_dev->ImagingBBox_set = true;
} }
/* The bitmap will be allocated when the device is opened. */ /* The bitmap will be allocated when the device is opened. */
new_dev->is_open = false; new_dev->is_open = false;
new_dev->bitmap_memory = mem; new_dev->bitmap_memory = mem;
return 0; return 0;
 End of changes. 3 change blocks. 
8 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)