def compose_or_print(self, widget, data=None):
# ???????? ????, ???? ?? ??????
self.window.hide()
gimp.context_push()
# ????????? ?????? ?????????? UNDO
self.image.undo_group_start()
# ?????? ???????
self.image.scale(self.mm_in_px(shelf['format']['width'], shelf['format']['resolution']), self.mm_in_px(shelf['format']['height'], shelf['format']['resolution']))
if self.oval_check.get_active():
self.oval(self.image, self.drawable)
if self.gray_check.get_active():
self.to_grayscale(self.image, self.drawable)
if self.border_check.get_active():
self.gray_frame(self.image)
if self.angle_right_circular_radio.get_active():
self.angle(self.image, self.drawable, 'right_circular')
elif self.angle_left_circular_radio.get_active():
self.angle(self.image, self.drawable, 'left_circular')
elif self.angle_right_direct_radio.get_active():
self.angle(self.image, self.drawable, 'right_direct')
elif self.angle_left_direct_radio.get_active():
self.angle(self.image, self.drawable, 'left_direct')
copys = self.copys_spin.get_value_as_int()
paper = self.paper_cb.get_active_text()
if data == 'print_it':
print_photo = True
else:
print_photo = False
self.print_functon(self.image, self.drawable, paper, copys, print_photo)
# ????????? ???????????? ?? ???????
gimp.displays_flush()
# ????????? ?????? ?????????? UNDO
self.image.undo_group_end()
gimp.context_pop()
gtk.main_quit()
# ??? ??????? ???????????? ?????????????? ????????
评论列表
文章目录