Lines Matching refs:job_params
26 void printable_area_get(wprint_job_params_t *job_params, float top_margin, in printable_area_get() argument
28 if (job_params == NULL) return; in printable_area_get()
30 job_params->printable_area_width = job_params->printable_area_height = 0.0f; in printable_area_get()
31 job_params->width = job_params->height = 0.0f; in printable_area_get()
32 job_params->page_top_margin = job_params->page_bottom_margin = 0.0f; in printable_area_get()
33 job_params->page_right_margin = job_params->page_left_margin = 0.0f; in printable_area_get()
35 job_params->page_width = 0.0f; in printable_area_get()
36 job_params->page_height = 0.0f; in printable_area_get()
39 if (job_params->media_size == SupportedMediaSizes[i].media_size) { in printable_area_get()
40 job_params->page_width = SupportedMediaSizes[i].WidthInInches / 1000; in printable_area_get()
41 job_params->page_height = SupportedMediaSizes[i].HeightInInches / 1000; in printable_area_get()
47 if (fabsf(job_params->source_width - job_params->page_width) < PAGE_SIZE_EPSILON && in printable_area_get()
48 fabsf(job_params->source_height - job_params->page_height) < PAGE_SIZE_EPSILON) { in printable_area_get()
50 job_params->preserve_scaling = true; in printable_area_get()
56 if (job_params->pcl_type == PCLm) { in printable_area_get()
57 if (job_params->borderless) { in printable_area_get()
58 job_params->printable_area_width = (unsigned int) _MI_TO_PIXELS( in printable_area_get()
59 job_params->page_width * 1000, job_params->pixel_units); in printable_area_get()
60 job_params->printable_area_height = (unsigned int) _MI_TO_PIXELS( in printable_area_get()
61 job_params->page_height * 1000, job_params->pixel_units); in printable_area_get()
63 job_params->printable_area_width = in printable_area_get()
64 (unsigned int) _MI_TO_PIXELS(job_params->page_width * 1000, in printable_area_get()
65 job_params->pixel_units) in printable_area_get()
66 - floorf(left_margin * (float) job_params->pixel_units) in printable_area_get()
67 - floorf(right_margin * (float) job_params->pixel_units); in printable_area_get()
68 job_params->printable_area_height = in printable_area_get()
69 (unsigned int) _MI_TO_PIXELS(job_params->page_height * 1000, in printable_area_get()
70 job_params->pixel_units) in printable_area_get()
71 - floorf(top_margin * (float) job_params->pixel_units) in printable_area_get()
72 - floorf(bottom_margin * (float) job_params->pixel_units); in printable_area_get()
75 job_params->printable_area_width = (unsigned int) floorf(((job_params->page_width - in printable_area_get()
76 (left_margin + right_margin)) * (float)job_params->pixel_units)); in printable_area_get()
77 job_params->printable_area_height = (unsigned int) floorf(((job_params->page_height - in printable_area_get()
78 (top_margin + bottom_margin)) * (float)job_params->pixel_units)); in printable_area_get()
81 job_params->page_top_margin = top_margin; in printable_area_get()
82 job_params->page_left_margin = left_margin; in printable_area_get()
83 job_params->page_right_margin = right_margin; in printable_area_get()
84 job_params->page_bottom_margin = bottom_margin; in printable_area_get()
86 if (!job_params->borderless) { in printable_area_get()
87 if (job_params->job_top_margin > top_margin) { in printable_area_get()
88 job_params->print_top_margin = floorf( in printable_area_get()
89 ((job_params->job_top_margin - top_margin) * (float) job_params->pixel_units)); in printable_area_get()
91 job_params->print_top_margin = floorf(((top_margin) * (float) job_params->pixel_units)); in printable_area_get()
93 if (job_params->job_left_margin > left_margin) { in printable_area_get()
94 job_params->print_left_margin = floorf(((job_params->job_left_margin - left_margin) * in printable_area_get()
95 (float) job_params->pixel_units)); in printable_area_get()
97 job_params->print_left_margin = floorf( in printable_area_get()
98 ((left_margin) * (float) job_params->pixel_units)); in printable_area_get()
100 if (job_params->job_right_margin > right_margin) { in printable_area_get()
101 job_params->print_right_margin = floorf(((job_params->job_right_margin - right_margin) * in printable_area_get()
102 (float) job_params->pixel_units)); in printable_area_get()
104 job_params->print_right_margin = floorf( in printable_area_get()
105 ((right_margin) * (float) job_params->pixel_units)); in printable_area_get()
107 if (job_params->job_bottom_margin > bottom_margin) { in printable_area_get()
108 job_params->print_bottom_margin = floorf( in printable_area_get()
109 ((job_params->job_bottom_margin - bottom_margin) * in printable_area_get()
110 (float) job_params->pixel_units)); in printable_area_get()
112 job_params->print_bottom_margin = floorf( in printable_area_get()
113 ((bottom_margin) * (float) job_params->pixel_units)); in printable_area_get()
117 job_params->width = (job_params->printable_area_width - in printable_area_get()
118 (job_params->print_left_margin + job_params->print_right_margin)); in printable_area_get()
119 job_params->height = (job_params->printable_area_height - in printable_area_get()
120 (job_params->print_top_margin + job_params->print_bottom_margin)); in printable_area_get()
123 job_params->source_width, job_params->source_height); in printable_area_get()
125 job_params->page_width, job_params->page_height); in printable_area_get()
128 void printable_area_get_default_margins(const wprint_job_params_t *job_params, in printable_area_get_default_margins() argument
133 if ((job_params == NULL) || (printer_cap == NULL)) { in printable_area_get_default_margins()
139 if (job_params->borderless) { in printable_area_get_default_margins()
141 switch (job_params->pcl_type) { in printable_area_get_default_margins()
157 switch (job_params->pcl_type) { in printable_area_get_default_margins()
189 if ((job_params->duplex != DUPLEX_MODE_NONE) || !printer_cap->borderless) { in printable_area_get_default_margins()