static int tiff_get_some_params(gx_device * dev, gs_param_list * plist, int which) { gx_device_tiff *const tfdev = (gx_device_tiff *)dev; int code = gdev_prn_get_params(dev, plist); int ecode = code; gs_param_string comprstr; if ((code = param_write_bool(plist, "BigEndian", &tfdev->BigEndian)) < 0) ecode = code; if ((code = tiff_compression_param_string(&comprstr, tfdev->Compression)) < 0 || (code = param_write_string(plist, "Compression", &comprstr)) < 0) ecode = code; if (which & 1) { if ((code = param_write_long(plist, "DownScaleFactor", &tfdev->DownScaleFactor)) < 0) ecode = code; } if ((code = param_write_long(plist, "MaxStripSize", &tfdev->MaxStripSize)) < 0) ecode = code; if ((code = param_write_long(plist, "AdjustWidth", &tfdev->AdjustWidth)) < 0) ecode = code; if ((code = param_write_long(plist, "MinFeatureSize", &tfdev->MinFeatureSize)) < 0) ecode = code; return ecode; }
static int perm_get_params(gx_device *pdev, gs_param_list *plist) { gx_device_perm_t * const dev = (gx_device_perm_t *)pdev; int code; code = param_write_int(plist, "Permute", &dev->permute); if (code >= 0) code = param_write_int(plist, "Mode", &dev->mode); /* * We need to specify the SeparationColorNames if we are permuting the colors. */ if (code >= 0 && dev->permute == 1) { int i; /* Temp variables. The data is copied into the plist below. */ gs_param_string_array scna; gs_param_string scn[6]; set_param_array(scna, scn, dev->num_std_colorant_names); /* Place colorant names into string array elements */ for (i = 0; i < dev->num_std_colorant_names; i++) param_string_from_string(scn[i], dev->std_colorant_names[i]); /* * Place the name array in the plist. This includes allocating * memory for the name array element and the actual string array. */ code = param_write_name_array(plist, "SeparationColorNames", &scna); } if (code >= 0) code = gdev_prn_get_params(pdev, plist); return code; }
/* Augment get/put_params to add UsePlanarBuffer. */ int gdev_prn_get_params_planar(gx_device * pdev, gs_param_list * plist, bool *pupb) { int ecode = gdev_prn_get_params(pdev, plist); if (ecode < 0) return ecode; return param_write_bool(plist, "UsePlanarBuffer", pupb); }
/* Get device parameters */ static int pngalpha_get_params(gx_device * pdev, gs_param_list * plist) { gx_device_pngalpha *ppdev = (gx_device_pngalpha *)pdev; int code = gdev_prn_get_params(pdev, plist); if (code >= 0) code = param_write_int(plist, "BackgroundColor", &(ppdev->background)); return code; }
/* Get os2pm parameters */ int os2prn_get_params(gx_device * dev, gs_param_list * plist) { int code = gdev_prn_get_params(dev, plist); gs_param_string qs; qs.data = opdev->queue_name, qs.size = strlen(qs.data), qs.persistent = false; code < 0 || (code = param_write_string(plist, "OS2QUEUE", &qs)) < 0; return code; }
static int ds32_get_params_downscale_cmyk(gx_device * dev, gs_param_list * plist) { gx_device_ds32 *const dsdev = (gx_device_ds32 *)dev; int code = gdev_prn_get_params(dev, plist); int ecode = code; code = gx_downscaler_write_params(plist, &dsdev->downscale, GX_DOWNSCALER_PARAMS_MFS | GX_DOWNSCALER_PARAMS_TRAP); if (code < 0) { ecode = code; } return ecode; }
static int fpng_get_params(gx_device * dev, gs_param_list * plist) { gx_device_fpng *pdev = (gx_device_fpng *)dev; int code, ecode; ecode = 0; if (pdev->downscale_factor < 1) pdev->downscale_factor = 1; if ((code = param_write_int(plist, "DownScaleFactor", &pdev->downscale_factor)) < 0) ecode = code; code = gdev_prn_get_params(dev, plist); if (code < 0) ecode = code; return ecode; }
static int hpjet_get_params(gx_device *pdev, gs_param_list *plist) { gx_device_hpjet *dev = (gx_device_hpjet *)pdev; int code = gdev_prn_get_params(pdev, plist); if (code >= 0) { code = param_write_bool(plist, "ManualFeed", &dev->ManualFeed); } if (code >= 0) { code = param_write_int(plist, "MediaPosition", &dev->MediaPosition); } if (code >=0) code = param_write_bool(plist, "Tumble", &dev->Tumble); return code; }
/* Get device parameters */ int win_pr2_get_params(gx_device * pdev, gs_param_list * plist) { int code = gdev_prn_get_params(pdev, plist); win_pr2_copy_check(wdev); if (code >= 0) code = param_write_bool(plist, "NoCancel", &(wdev->nocancel)); if (code >= 0) code = param_write_int(plist, "QueryUser", &(wdev->query_user)); if (code >= 0) code = win_pr2_write_user_settings(wdev, plist); if ((code >= 0) && (wdev->Duplex_set > 0)) code = param_write_bool(plist, "Tumble", &(wdev->tumble)); return code; }