Ticket #2463: 0001-Implemented-Mirroring-Effect-in-Paint-Activity-SL-24.patch
File 0001-Implemented-Mirroring-Effect-in-Paint-Activity-SL-24.patch, 24.5 KB (added by seeta, 14 years ago) |
---|
-
Area.py
From 0faff64d9c27f3bcf14048b15ee720d34b4a82f8 Mon Sep 17 00:00:00 2001 From: Ayush Goyal <ayush@seeta.in> Date: Tue, 19 Oct 2010 19:51:15 +0530 Subject: [PATCH Paint Activity] 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 | 40 ++++++- icons/mirror-horizontal.svg | 272 +++++++++++++++++++++++++++++++++++++++++++ icons/mirror-vertical.svg | 272 +++++++++++++++++++++++++++++++++++++++++++ toolbox.py | 27 ++++- 4 files changed, 605 insertions(+), 6 deletions(-) create mode 100644 icons/mirror-horizontal.svg create mode 100644 icons/mirror-vertical.svg diff --git a/Area.py b/Area.py index 7c7f4c5..bb83fee 100644
a b class Area(gtk.DrawingArea): 835 835 if not self.selmove: 836 836 self.enableUndo(widget) 837 837 838 def invert_colors(self, widget):838 def invert_colors(self, widget): 839 839 """Apply invert color effect. 840 840 841 841 @param self -- the Area object (GtkDrawingArea) … … class Area(gtk.DrawingArea): 873 873 self.queue_draw() 874 874 if not self.selmove: 875 875 self.enableUndo(widget) 876 877 def mirror(self, widget, flip): 878 """Apply mirror horizontal/vertical effect. 879 880 @param self -- the Area object (GtkDrawingArea) 881 @param widget -- the Area object (GtkDrawingArea) 882 883 """ 884 885 width, height = self.window.get_size() 886 887 if self.selmove: 888 size = self.pixmap_sel.get_size() 889 pix = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False,8,size[0],size[1]) 890 pix.get_from_drawable(self.pixmap_sel,gtk.gdk.colormap_get_system(),0,0,0,0,size[0],size[1]) 891 else: 892 pix = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB,False,8,width,height) 893 pix.get_from_drawable(self.pixmap,gtk.gdk.colormap_get_system(),0,0,0,0,width,height) 894 895 if flip=='Horizontal': 896 pix=pix.flip(True) 897 else: 898 pix=pix.flip(False) 899 900 if self.selmove: 901 self.pixmap_sel.draw_pixbuf(self.gc,pix,0,0,0,0,size[0],size[1],dither=gtk.gdk.RGB_DITHER_NORMAL,x_dither=0,y_dither=0) 902 903 self.pixmap_temp.draw_drawable(self.gc,self.pixmap,0,0,0,0,width,height) 904 self.pixmap_temp.draw_drawable(self.gc,self.pixmap_sel,0,0,self.orig_x,self.orig_y,size[0],size[1]) 905 self.pixmap_temp.draw_rectangle(self.gc_selection,False,self.orig_x,self.orig_y,size[0],size[1]) 906 self.pixmap_temp.draw_rectangle(self.gc_selection1,False,self.orig_x-1,self.orig_y-1,size[0]+2,size[1]+2) 907 908 else: 909 self.pixmap.draw_pixbuf(self.gc,pix,0,0,0,0,width,height,dither=gtk.gdk.RGB_DITHER_NORMAL,x_dither=0,y_dither=0) 910 911 self.queue_draw() 912 if not self.selmove: 913 self.enableUndo(widget) 876 914 877 915 def _pixbuf2Image(self, pb): 878 916 """change a pixbuf to RGB image -
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 c45ad0e..d15d2db 100644
a b class EffectsToolbar(gtk.Toolbar): 1258 1258 self._effect_rainbow = DrawToolButton('effect-rainbow', activity.tool_group,_('Rainbow')) 1259 1259 self.insert(self._effect_rainbow, -1) 1260 1260 self._configure_palette(self._effect_rainbow, self._EFFECT_RAINBOW) 1261 1262 1263 separator = gtk.SeparatorToolItem() 1264 self.insert(separator, -1) 1265 1261 1266 1262 self._invert_colors = ToolButton('invert-colors') 1267 1263 self.insert(self._invert_colors, -1) 1268 1264 self._invert_colors.show() 1269 1265 self._invert_colors.set_tooltip(_('Invert Colors')) 1270 1266 1267 separator = gtk.SeparatorToolItem() 1268 self.insert(separator, -1) 1269 1270 self._mirror_horizontal = ToolButton('mirror-horizontal') 1271 self.insert(self._mirror_horizontal, -1) 1272 self._mirror_horizontal.show() 1273 self._mirror_horizontal.set_tooltip(_('Mirror Horizontal')) 1274 1275 self._mirror_vertical = ToolButton('mirror-vertical') 1276 self.insert(self._mirror_vertical, -1) 1277 self._mirror_vertical.show() 1278 self._mirror_vertical.set_tooltip(_('Mirror Vertical')) 1279 1271 1280 """ 1272 1281 #FIXME: Must be implemented 1273 1282 self._black_and_white = ToolButton('black_and_white') … … class EffectsToolbar(gtk.Toolbar): 1280 1289 self._effect_grayscale.connect('clicked', self.grayscale) 1281 1290 self._effect_rainbow.connect('clicked', self.rainbow) 1282 1291 self._invert_colors.connect('clicked', self.invert_colors) 1292 self._mirror_vertical.connect('clicked', self.mirror_vertical) 1293 self._mirror_horizontal.connect('clicked', self.mirror_horizontal) 1283 1294 1284 1295 ##Make the colors be in grayscale 1285 1296 def grayscale(self, widget): … … class EffectsToolbar(gtk.Toolbar): 1291 1302 1292 1303 def invert_colors(self, widget): 1293 1304 self._activity.area.invert_colors(widget) 1305 1306 def mirror_horizontal(self, widget): 1307 self._activity.area.mirror(widget, 'Horizontal') 1308 1309 def mirror_vertical(self, widget): 1310 self._activity.area.mirror(widget, 'Vertical') 1294 1311 1295 1312 # setting cursor: moved to Area 1296 1313