Ticket #2463: 0001-Implemented-Mirroring-Effect-in-Paint-Activity-SL-24.2.patch
File 0001-Implemented-Mirroring-Effect-in-Paint-Activity-SL-24.2.patch, 23.9 KB (added by seeta, 14 years ago) |
---|
-
Area.py
From dbe38362646f5a063d21df287660a1e6f20f1018 Mon Sep 17 00:00:00 2001 From: Ayush Goyal <ayush@seeta.in> Date: Wed, 20 Oct 2010 19:32:32 +0530 Subject: [PATCH Paint activity v2] Implemented Mirroring Effect in Paint Activity (SL#2463) Two mirror effects 'Mirror Horizontal' and 'Mirror Vertical' have been added. Mirror horizontal tool flips the entire image or selected area horizontally. Mirror vertical tool does the same vertically. Signed-off-by: Ayush Goyal <ayush@seeta.in> --- Area.py | 47 ++++++++ icons/mirror-horizontal.svg | 272 +++++++++++++++++++++++++++++++++++++++++++ icons/mirror-vertical.svg | 272 +++++++++++++++++++++++++++++++++++++++++++ toolbox.py | 18 +++ 4 files changed, 609 insertions(+), 0 deletions(-) create mode 100644 icons/mirror-horizontal.svg create mode 100644 icons/mirror-vertical.svg v1->v2:Standardized to pep8 and optimized the code diff --git a/Area.py b/Area.py index 35d38b3..ba022f5 100644
a b class Area(gtk.DrawingArea): 966 966 if not self.selmove: 967 967 self.enableUndo(widget) 968 968 969 def mirror(self, widget, horizontal=True): 970 """Apply mirror horizontal/vertical effect. 971 972 @param self -- the Area object (GtkDrawingArea) 973 @param widget -- the Area object (GtkDrawingArea) 974 @param horizontal -- If true sets flip as horizontal else vertical 975 976 """ 977 978 width, height = self.window.get_size() 979 980 if self.selmove: 981 size = self.pixmap_sel.get_size() 982 pix = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, 983 size[0], size[1]) 984 pix.get_from_drawable(self.pixmap_sel, 985 gtk.gdk.colormap_get_system(), 0, 0, 0, 0, size[0], size[1]) 986 else: 987 pix = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, 988 width, height) 989 pix.get_from_drawable(self.pixmap, gtk.gdk.colormap_get_system(), 990 0, 0, 0, 0, width, height) 991 992 pix = pix.flip(horizontal) 993 994 if self.selmove: 995 self.pixmap_sel.draw_pixbuf(self.gc, pix, 0, 0, 0, 0, 996 size[0], size[1], dither=gtk.gdk.RGB_DITHER_NORMAL, 997 x_dither=0, y_dither=0) 998 999 self.pixmap_temp.draw_drawable(self.gc, self.pixmap, 0, 0, 0, 0, 1000 width, height) 1001 self.pixmap_temp.draw_drawable(self.gc, self.pixmap_sel, 1002 0, 0, self.orig_x, self.orig_y, size[0], size[1]) 1003 self.pixmap_temp.draw_rectangle(self.gc_selection, False, 1004 self.orig_x, self.orig_y, size[0], size[1]) 1005 self.pixmap_temp.draw_rectangle(self.gc_selection1, False, 1006 self.orig_x - 1, self.orig_y - 1, size[0] + 2, size[1] + 2) 1007 1008 else: 1009 self.pixmap.draw_pixbuf(self.gc, pix, 0, 0, 0, 0, width, height, 1010 dither=gtk.gdk.RGB_DITHER_NORMAL, x_dither=0, y_dither=0) 1011 1012 self.queue_draw() 1013 if not self.selmove: 1014 self.enableUndo(widget) 1015 969 1016 def _pixbuf2Image(self, pb): 970 1017 """change a pixbuf to RGB image 971 1018 -
new file icons/mirror-horizontal.svg
diff --git a/icons/mirror-horizontal.svg b/icons/mirror-horizontal.svg new file mode 100644 index 0000000..2554356
- + 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 <svg 3 xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" 4 xmlns:dc="http://purl.org/dc/elements/1.1/" 5 xmlns:cc="http://creativecommons.org/ns#" 6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 7 xmlns:svg="http://www.w3.org/2000/svg" 8 xmlns="http://www.w3.org/2000/svg" 9 xmlns:xlink="http://www.w3.org/1999/xlink" 10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" 11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" 12 enable-background="new 0 0 55 55" 13 height="55px" 14 version="1.1" 15 viewBox="0 0 55 55" 16 width="55px" 17 x="0px" 18 xml:space="preserve" 19 y="0px" 20 id="svg2" 21 inkscape:version="0.48.0 r9654" 22 sodipodi:docname="mirror-horizontal.svg"><metadata 23 id="metadata50"><rdf:RDF><cc:Work 24 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 25 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs 26 id="defs48"><inkscape:path-effect 27 effect="skeletal" 28 id="path-effect5822" 29 is_visible="true" 30 pattern="M 0,0 0,10 10,5 z" 31 copytype="single_stretched" 32 prop_scale="1" 33 scale_y_rel="false" 34 spacing="0" 35 normal_offset="0" 36 tang_offset="0" 37 prop_units="false" 38 vertical_pattern="false" 39 fuse_tolerance="0" /><inkscape:path-effect 40 effect="skeletal" 41 id="path-effect5818" 42 is_visible="true" 43 pattern="M 0,0 0,10 10,5 z" 44 copytype="single_stretched" 45 prop_scale="1" 46 scale_y_rel="false" 47 spacing="0" 48 normal_offset="0" 49 tang_offset="0" 50 prop_units="false" 51 vertical_pattern="false" 52 fuse_tolerance="0" /><linearGradient 53 id="linearGradient5788" 54 osb:paint="solid"><stop 55 style="stop-color:#000000;stop-opacity:1;" 56 offset="0" 57 id="stop5790" /></linearGradient><linearGradient 58 gradientTransform="matrix(-4.371139e-8,1,-1,-4.371139e-8,55,-4.882812e-4)" 59 gradientUnits="userSpaceOnUse" 60 id="SVGID_1_-0" 61 x1="8.4995003" 62 x2="46.5" 63 y1="27.5" 64 y2="27.5"><stop 65 offset="0" 66 style="stop-color:#FF0000" 67 id="stop6-4" /><stop 68 offset="0.0044" 69 style="stop-color:#FF0500" 70 id="stop8-8" /><stop 71 offset="0.0489" 72 style="stop-color:#FF3000" 73 id="stop10-7" /><stop 74 offset="0.092" 75 style="stop-color:#FF5200" 76 id="stop12-1" /><stop 77 offset="0.1326" 78 style="stop-color:#FF6B00" 79 id="stop14-7" /><stop 80 offset="0.1699" 81 style="stop-color:#FF7A00" 82 id="stop16-2" /><stop 83 offset="0.2006" 84 style="stop-color:#FF7F00" 85 id="stop18-7" /><stop 86 offset="0.2506" 87 style="stop-color:#FF9200" 88 id="stop20-2" /><stop 89 offset="0.3497" 90 style="stop-color:#FFB300" 91 id="stop22-2" /><stop 92 offset="0.4042" 93 style="stop-color:#FFBF00" 94 id="stop24-6" /><stop 95 offset="0.4385" 96 style="stop-color:#E3CA03" 97 id="stop26-1" /><stop 98 offset="0.5423" 99 style="stop-color:#93EB0C" 100 id="stop28-0" /><stop 101 offset="0.5898" 102 style="stop-color:#73F80F" 103 id="stop30-6" /><stop 104 offset="0.6159" 105 style="stop-color:#6AF11D" 106 id="stop32-1" /><stop 107 offset="0.6649" 108 style="stop-color:#54E041" 109 id="stop34-5" /><stop 110 offset="0.7315" 111 style="stop-color:#2FC47B" 112 id="stop36-9" /><stop 113 offset="0.8084" 114 style="stop-color:#00A0C6" 115 id="stop38-4" /><stop 116 offset="0.8916" 117 style="stop-color:#1C64CB" 118 id="stop40-9" /><stop 119 offset="1" 120 style="stop-color:#4210D2" 121 id="stop42-0" /></linearGradient><linearGradient 122 gradientTransform="matrix(-4.371139e-8,1,-1,-4.371139e-8,55,-4.882812e-4)" 123 gradientUnits="userSpaceOnUse" 124 id="SVGID_1_-0-1" 125 x1="8.4995003" 126 x2="46.5" 127 y1="27.5" 128 y2="27.5"><stop 129 offset="0" 130 style="stop-color:#FF0000" 131 id="stop6-4-7" /><stop 132 offset="0.0044" 133 style="stop-color:#FF0500" 134 id="stop8-8-5" /><stop 135 offset="0.0489" 136 style="stop-color:#FF3000" 137 id="stop10-7-9" /><stop 138 offset="0.092" 139 style="stop-color:#FF5200" 140 id="stop12-1-6" /><stop 141 offset="0.1326" 142 style="stop-color:#FF6B00" 143 id="stop14-7-2" /><stop 144 offset="0.1699" 145 style="stop-color:#FF7A00" 146 id="stop16-2-1" /><stop 147 offset="0.2006" 148 style="stop-color:#FF7F00" 149 id="stop18-7-7" /><stop 150 offset="0.2506" 151 style="stop-color:#FF9200" 152 id="stop20-2-8" /><stop 153 offset="0.3497" 154 style="stop-color:#FFB300" 155 id="stop22-2-5" /><stop 156 offset="0.4042" 157 style="stop-color:#FFBF00" 158 id="stop24-6-7" /><stop 159 offset="0.4385" 160 style="stop-color:#E3CA03" 161 id="stop26-1-4" /><stop 162 offset="0.5423" 163 style="stop-color:#93EB0C" 164 id="stop28-0-1" /><stop 165 offset="0.5898" 166 style="stop-color:#73F80F" 167 id="stop30-6-8" /><stop 168 offset="0.6159" 169 style="stop-color:#6AF11D" 170 id="stop32-1-5" /><stop 171 offset="0.6649" 172 style="stop-color:#54E041" 173 id="stop34-5-9" /><stop 174 offset="0.7315" 175 style="stop-color:#2FC47B" 176 id="stop36-9-7" /><stop 177 offset="0.8084" 178 style="stop-color:#00A0C6" 179 id="stop38-4-5" /><stop 180 offset="0.8916" 181 style="stop-color:#1C64CB" 182 id="stop40-9-3" /><stop 183 offset="1" 184 style="stop-color:#4210D2" 185 id="stop42-0-8" /></linearGradient><linearGradient 186 y2="27.5" 187 x2="46.5" 188 y1="27.5" 189 x1="8.4995003" 190 gradientTransform="matrix(-4.371139e-8,1,-1,-4.371139e-8,55,-4.882812e-4)" 191 gradientUnits="userSpaceOnUse" 192 id="linearGradient3454" 193 xlink:href="#SVGID_1_-0-1" 194 inkscape:collect="always" /><filter 195 id="filter3547" 196 inkscape:label="Invert" 197 x="0" 198 y="0" 199 width="1" 200 height="1" 201 inkscape:menu="Color" 202 inkscape:menu-tooltip="Invert colors" 203 color-interpolation-filters="sRGB"><feColorMatrix 204 id="feColorMatrix3549" 205 type="saturate" 206 values="1" 207 result="fbSourceGraphic" /><feColorMatrix 208 id="feColorMatrix3551" 209 in="fbSourceGraphic" 210 values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 " /></filter></defs><sodipodi:namedview 211 pagecolor="#ffffff" 212 bordercolor="#666666" 213 borderopacity="1" 214 objecttolerance="10" 215 gridtolerance="10" 216 guidetolerance="10" 217 inkscape:pageopacity="0" 218 inkscape:pageshadow="2" 219 inkscape:window-width="1280" 220 inkscape:window-height="751" 221 id="namedview46" 222 showgrid="false" 223 inkscape:zoom="9.7454545" 224 inkscape:cx="27.721451" 225 inkscape:cy="49.087021" 226 inkscape:window-x="0" 227 inkscape:window-y="24" 228 inkscape:window-maximized="1" 229 inkscape:current-layer="svg2" 230 inkscape:snap-global="false" /><rect 231 style="fill:#ffffff;fill-opacity:1;stroke:none" 232 id="rect3800" 233 width="56.231339" 234 height="55.718288" 235 x="-0.82089543" 236 y="-3.6838074e-07" /><path 237 sodipodi:type="star" 238 style="fill:#ffffff;stroke:#000000;stroke-width:1.11099993999999991;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;fill-opacity:1" 239 id="path3928" 240 sodipodi:sides="3" 241 sodipodi:cx="19.393658" 242 sodipodi:cy="8.2089548" 243 sodipodi:r1="10.515096" 244 sodipodi:r2="5.2575479" 245 sodipodi:arg1="0.52359878" 246 sodipodi:arg2="1.5707963" 247 inkscape:flatsided="true" 248 inkscape:rounded="0" 249 inkscape:randomized="0" 250 d="m 28.499998,13.466503 -18.21268,0 9.10634,-15.7726439 z" 251 transform="matrix(0,1,-1,0,50.792911,6.156715)" 252 inkscape:transform-center-x="-2.6287735" /><path 253 sodipodi:type="star" 254 style="fill:#ffffff;stroke:#000000;stroke-width:1.11099993999999991;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;fill-opacity:1" 255 id="path3928-8" 256 sodipodi:sides="3" 257 sodipodi:cx="19.393658" 258 sodipodi:cy="8.2089548" 259 sodipodi:r1="10.515096" 260 sodipodi:r2="5.2575479" 261 sodipodi:arg1="0.52359878" 262 sodipodi:arg2="1.5707963" 263 inkscape:flatsided="true" 264 inkscape:rounded="0" 265 inkscape:randomized="0" 266 d="m 28.499998,13.466503 -18.21268,0 9.10634,-15.7726439 z" 267 transform="matrix(0,-1,1,0,5.0523239,45.188391)" 268 inkscape:transform-center-x="2.6287735" /><path 269 style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:1, 1;stroke-dashoffset:0" 270 d="M 27.397388,0.20522335 27.602612,54.999999 27.5,54.692163 l 0,0.205224" 271 id="path3948" 272 inkscape:connector-curvature="0" /></svg> 273 No newline at end of file -
new file icons/mirror-vertical.svg
diff --git a/icons/mirror-vertical.svg b/icons/mirror-vertical.svg new file mode 100644 index 0000000..0bfd72b
- + 1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> 2 <svg 3 xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" 4 xmlns:dc="http://purl.org/dc/elements/1.1/" 5 xmlns:cc="http://creativecommons.org/ns#" 6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 7 xmlns:svg="http://www.w3.org/2000/svg" 8 xmlns="http://www.w3.org/2000/svg" 9 xmlns:xlink="http://www.w3.org/1999/xlink" 10 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" 11 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" 12 enable-background="new 0 0 55 55" 13 height="55px" 14 version="1.1" 15 viewBox="0 0 55 55" 16 width="55px" 17 x="0px" 18 xml:space="preserve" 19 y="0px" 20 id="svg2" 21 inkscape:version="0.48.0 r9654" 22 sodipodi:docname="mirror-vertical.svg"><metadata 23 id="metadata50"><rdf:RDF><cc:Work 24 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 25 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs 26 id="defs48"><inkscape:path-effect 27 effect="skeletal" 28 id="path-effect5822" 29 is_visible="true" 30 pattern="M 0,0 0,10 10,5 z" 31 copytype="single_stretched" 32 prop_scale="1" 33 scale_y_rel="false" 34 spacing="0" 35 normal_offset="0" 36 tang_offset="0" 37 prop_units="false" 38 vertical_pattern="false" 39 fuse_tolerance="0" /><inkscape:path-effect 40 effect="skeletal" 41 id="path-effect5818" 42 is_visible="true" 43 pattern="M 0,0 0,10 10,5 z" 44 copytype="single_stretched" 45 prop_scale="1" 46 scale_y_rel="false" 47 spacing="0" 48 normal_offset="0" 49 tang_offset="0" 50 prop_units="false" 51 vertical_pattern="false" 52 fuse_tolerance="0" /><linearGradient 53 id="linearGradient5788" 54 osb:paint="solid"><stop 55 style="stop-color:#000000;stop-opacity:1;" 56 offset="0" 57 id="stop5790" /></linearGradient><linearGradient 58 gradientTransform="matrix(-4.371139e-8,1,-1,-4.371139e-8,55,-4.882812e-4)" 59 gradientUnits="userSpaceOnUse" 60 id="SVGID_1_-0" 61 x1="8.4995003" 62 x2="46.5" 63 y1="27.5" 64 y2="27.5"><stop 65 offset="0" 66 style="stop-color:#FF0000" 67 id="stop6-4" /><stop 68 offset="0.0044" 69 style="stop-color:#FF0500" 70 id="stop8-8" /><stop 71 offset="0.0489" 72 style="stop-color:#FF3000" 73 id="stop10-7" /><stop 74 offset="0.092" 75 style="stop-color:#FF5200" 76 id="stop12-1" /><stop 77 offset="0.1326" 78 style="stop-color:#FF6B00" 79 id="stop14-7" /><stop 80 offset="0.1699" 81 style="stop-color:#FF7A00" 82 id="stop16-2" /><stop 83 offset="0.2006" 84 style="stop-color:#FF7F00" 85 id="stop18-7" /><stop 86 offset="0.2506" 87 style="stop-color:#FF9200" 88 id="stop20-2" /><stop 89 offset="0.3497" 90 style="stop-color:#FFB300" 91 id="stop22-2" /><stop 92 offset="0.4042" 93 style="stop-color:#FFBF00" 94 id="stop24-6" /><stop 95 offset="0.4385" 96 style="stop-color:#E3CA03" 97 id="stop26-1" /><stop 98 offset="0.5423" 99 style="stop-color:#93EB0C" 100 id="stop28-0" /><stop 101 offset="0.5898" 102 style="stop-color:#73F80F" 103 id="stop30-6" /><stop 104 offset="0.6159" 105 style="stop-color:#6AF11D" 106 id="stop32-1" /><stop 107 offset="0.6649" 108 style="stop-color:#54E041" 109 id="stop34-5" /><stop 110 offset="0.7315" 111 style="stop-color:#2FC47B" 112 id="stop36-9" /><stop 113 offset="0.8084" 114 style="stop-color:#00A0C6" 115 id="stop38-4" /><stop 116 offset="0.8916" 117 style="stop-color:#1C64CB" 118 id="stop40-9" /><stop 119 offset="1" 120 style="stop-color:#4210D2" 121 id="stop42-0" /></linearGradient><linearGradient 122 gradientTransform="matrix(-4.371139e-8,1,-1,-4.371139e-8,55,-4.882812e-4)" 123 gradientUnits="userSpaceOnUse" 124 id="SVGID_1_-0-1" 125 x1="8.4995003" 126 x2="46.5" 127 y1="27.5" 128 y2="27.5"><stop 129 offset="0" 130 style="stop-color:#FF0000" 131 id="stop6-4-7" /><stop 132 offset="0.0044" 133 style="stop-color:#FF0500" 134 id="stop8-8-5" /><stop 135 offset="0.0489" 136 style="stop-color:#FF3000" 137 id="stop10-7-9" /><stop 138 offset="0.092" 139 style="stop-color:#FF5200" 140 id="stop12-1-6" /><stop 141 offset="0.1326" 142 style="stop-color:#FF6B00" 143 id="stop14-7-2" /><stop 144 offset="0.1699" 145 style="stop-color:#FF7A00" 146 id="stop16-2-1" /><stop 147 offset="0.2006" 148 style="stop-color:#FF7F00" 149 id="stop18-7-7" /><stop 150 offset="0.2506" 151 style="stop-color:#FF9200" 152 id="stop20-2-8" /><stop 153 offset="0.3497" 154 style="stop-color:#FFB300" 155 id="stop22-2-5" /><stop 156 offset="0.4042" 157 style="stop-color:#FFBF00" 158 id="stop24-6-7" /><stop 159 offset="0.4385" 160 style="stop-color:#E3CA03" 161 id="stop26-1-4" /><stop 162 offset="0.5423" 163 style="stop-color:#93EB0C" 164 id="stop28-0-1" /><stop 165 offset="0.5898" 166 style="stop-color:#73F80F" 167 id="stop30-6-8" /><stop 168 offset="0.6159" 169 style="stop-color:#6AF11D" 170 id="stop32-1-5" /><stop 171 offset="0.6649" 172 style="stop-color:#54E041" 173 id="stop34-5-9" /><stop 174 offset="0.7315" 175 style="stop-color:#2FC47B" 176 id="stop36-9-7" /><stop 177 offset="0.8084" 178 style="stop-color:#00A0C6" 179 id="stop38-4-5" /><stop 180 offset="0.8916" 181 style="stop-color:#1C64CB" 182 id="stop40-9-3" /><stop 183 offset="1" 184 style="stop-color:#4210D2" 185 id="stop42-0-8" /></linearGradient><linearGradient 186 y2="27.5" 187 x2="46.5" 188 y1="27.5" 189 x1="8.4995003" 190 gradientTransform="matrix(-4.371139e-8,1,-1,-4.371139e-8,55,-4.882812e-4)" 191 gradientUnits="userSpaceOnUse" 192 id="linearGradient3454" 193 xlink:href="#SVGID_1_-0-1" 194 inkscape:collect="always" /><filter 195 id="filter3547" 196 inkscape:label="Invert" 197 x="0" 198 y="0" 199 width="1" 200 height="1" 201 inkscape:menu="Color" 202 inkscape:menu-tooltip="Invert colors" 203 color-interpolation-filters="sRGB"><feColorMatrix 204 id="feColorMatrix3549" 205 type="saturate" 206 values="1" 207 result="fbSourceGraphic" /><feColorMatrix 208 id="feColorMatrix3551" 209 in="fbSourceGraphic" 210 values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 " /></filter></defs><sodipodi:namedview 211 pagecolor="#ffffff" 212 bordercolor="#666666" 213 borderopacity="1" 214 objecttolerance="10" 215 gridtolerance="10" 216 guidetolerance="10" 217 inkscape:pageopacity="0" 218 inkscape:pageshadow="2" 219 inkscape:window-width="1280" 220 inkscape:window-height="751" 221 id="namedview46" 222 showgrid="false" 223 inkscape:zoom="9.7454545" 224 inkscape:cx="9.0773758" 225 inkscape:cy="15.370883" 226 inkscape:window-x="0" 227 inkscape:window-y="24" 228 inkscape:window-maximized="1" 229 inkscape:current-layer="svg2" 230 inkscape:snap-global="false" /><rect 231 style="fill:#ffffff;fill-opacity:1;stroke:none" 232 id="rect3800" 233 width="56.949623" 234 height="55.8209" 235 x="-1.1287289" 236 y="-0.051307671" /><path 237 sodipodi:type="star" 238 style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.11099994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" 239 id="path3928" 240 sodipodi:sides="3" 241 sodipodi:cx="19.393658" 242 sodipodi:cy="8.2089548" 243 sodipodi:r1="10.515096" 244 sodipodi:r2="5.2575479" 245 sodipodi:arg1="0.52359878" 246 sodipodi:arg2="1.5707963" 247 inkscape:flatsided="true" 248 inkscape:rounded="0" 249 inkscape:randomized="0" 250 d="m 28.499998,13.466503 -18.21268,0 9.10634,-15.7726439 z" 251 inkscape:transform-center-y="-2.6287739" 252 transform="translate(7.0802239,4.8246269)" /><path 253 sodipodi:type="star" 254 style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.11099994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" 255 id="path3928-8" 256 sodipodi:sides="3" 257 sodipodi:cx="19.393658" 258 sodipodi:cy="8.2089548" 259 sodipodi:r1="10.515096" 260 sodipodi:r2="5.2575479" 261 sodipodi:arg1="0.52359878" 262 sodipodi:arg2="1.5707963" 263 inkscape:flatsided="true" 264 inkscape:rounded="0" 265 inkscape:randomized="0" 266 d="m 28.499998,13.466503 -18.21268,0 9.10634,-15.7726439 z" 267 inkscape:transform-center-y="2.6287735" 268 transform="matrix(1,0,0,-1,7.4906711,48.214509)" /><path 269 style="fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:1,1;stroke-dashoffset:0" 270 d="M 0.20522388,26.679104 55,26.47388 l -0.307836,0.102612 0.205224,0" 271 id="path3948" 272 inkscape:connector-curvature="0" /></svg> 273 No newline at end of file -
toolbox.py
diff --git a/toolbox.py b/toolbox.py index 1ff4e6f..d8b75ee 100644
a b class EffectsToolbar(gtk.Toolbar): 1276 1276 separator = gtk.SeparatorToolItem() 1277 1277 self.insert(separator, -1) 1278 1278 1279 self._mirror_horizontal = ToolButton('mirror-horizontal') 1280 self.insert(self._mirror_horizontal, -1) 1281 self._mirror_horizontal.show() 1282 self._mirror_horizontal.set_tooltip(_('Mirror Horizontal')) 1283 1284 self._mirror_vertical = ToolButton('mirror-vertical') 1285 self.insert(self._mirror_vertical, -1) 1286 self._mirror_vertical.show() 1287 self._mirror_vertical.set_tooltip(_('Mirror Vertical')) 1288 1279 1289 """ 1280 1290 #FIXME: Must be implemented 1281 1291 self._black_and_white = ToolButton('black_and_white') … … class EffectsToolbar(gtk.Toolbar): 1290 1300 self._effect_grayscale.connect('clicked', self.grayscale) 1291 1301 self._effect_rainbow.connect('clicked', self.rainbow) 1292 1302 self._invert_colors.connect('clicked', self.invert_colors) 1303 self._mirror_vertical.connect('clicked', self.mirror_vertical) 1304 self._mirror_horizontal.connect('clicked', self.mirror_horizontal) 1293 1305 1294 1306 ##Make the colors be in grayscale 1295 1307 def grayscale(self, widget): … … class EffectsToolbar(gtk.Toolbar): 1302 1314 def invert_colors(self, widget): 1303 1315 self._activity.area.invert_colors(widget) 1304 1316 1317 def mirror_horizontal(self, widget): 1318 self._activity.area.mirror(widget) 1319 1320 def mirror_vertical(self, widget): 1321 self._activity.area.mirror(widget, horizontal=False) 1322 1305 1323 # setting cursor: moved to Area 1306 1324 1307 1325 def _configure_palette(self, button, tool=None):