Lines Matching refs:job_params
26 void printable_area_get(wprint_job_params_t *job_params, float top_margin, float left_margin,
28 if (job_params == NULL) return;
30 job_params->printable_area_width = job_params->printable_area_height = 0.0f;
31 job_params->width = job_params->height = 0.0f;
32 job_params->page_top_margin = job_params->page_bottom_margin = 0.0f;
33 job_params->page_right_margin = job_params->page_left_margin = 0.0f;
35 job_params->page_width = 0.0f;
36 job_params->page_height = 0.0f;
39 if (job_params->media_size == SupportedMediaSizes[i].media_size) {
40 job_params->page_width = SupportedMediaSizes[i].WidthInInches / 1000;
41 job_params->page_height = SupportedMediaSizes[i].HeightInInches / 1000;
47 job_params->printable_area_width = floorf(
48 ((job_params->page_width - (left_margin + right_margin)) *
49 (float) job_params->pixel_units));
50 job_params->printable_area_height = floorf(
51 ((job_params->page_height - (top_margin + bottom_margin)) *
52 (float) job_params->pixel_units));
54 job_params->page_top_margin = top_margin;
55 job_params->page_left_margin = left_margin;
56 job_params->page_right_margin = right_margin;
57 job_params->page_bottom_margin = bottom_margin;
59 if (!job_params->borderless) {
60 if (job_params->job_top_margin > top_margin) {
61 job_params->print_top_margin = floorf(
62 ((job_params->job_top_margin - top_margin) * (float) job_params->pixel_units));
64 job_params->print_top_margin = floorf(((top_margin) * (float) job_params->pixel_units));
66 if (job_params->job_left_margin > left_margin) {
67 job_params->print_left_margin = floorf(((job_params->job_left_margin - left_margin) *
68 (float) job_params->pixel_units));
70 job_params->print_left_margin = floorf(
71 ((left_margin) * (float) job_params->pixel_units));
73 if (job_params->job_right_margin > right_margin) {
74 job_params->print_right_margin = floorf(((job_params->job_right_margin - right_margin) *
75 (float) job_params->pixel_units));
77 job_params->print_right_margin = floorf(
78 ((right_margin) * (float) job_params->pixel_units));
80 if (job_params->job_bottom_margin > bottom_margin) {
81 job_params->print_bottom_margin = floorf(
82 ((job_params->job_bottom_margin - bottom_margin) *
83 (float) job_params->pixel_units));
85 job_params->print_bottom_margin = floorf(
86 ((bottom_margin) * (float) job_params->pixel_units));
90 job_params->width = (job_params->printable_area_width -
91 (job_params->print_left_margin + job_params->print_right_margin));
92 job_params->height = (job_params->printable_area_height -
93 (job_params->print_top_margin + job_params->print_bottom_margin));
96 void printable_area_get_default_margins(const wprint_job_params_t *job_params,
101 if ((job_params == NULL) || (printer_cap == NULL)) {
107 if (job_params->borderless) {
109 switch (job_params->pcl_type) {
125 switch (job_params->pcl_type) {
157 if ((job_params->duplex != DUPLEX_MODE_NONE) || !printer_cap->borderless) {