{"id":10794,"date":"2016-04-04T18:06:00","date_gmt":"2016-04-04T18:06:00","guid":{"rendered":"http:\/\/melotopia.net\/b\/?p=10794"},"modified":"2016-04-04T18:06:00","modified_gmt":"2016-04-04T18:06:00","slug":"%ec%9c%88%eb%8f%84%ec%9a%b0%ec%97%90-%ec%84%a0-%ea%b8%8b%eb%8a%94-%ed%8c%8c%ec%9d%b4%ec%8d%ac-%ec%98%88%ec%a0%9c","status":"publish","type":"post","link":"http:\/\/melotopia.net\/b\/?p=10794","title":{"rendered":"\uc708\ub3c4\uc6b0\uc5d0 \uc120 \uae0b\ub294 \ud30c\uc774\uc36c \uc608\uc81c"},"content":{"rendered":"<div class=\"desc\">\n<div class=\"tt_article_useless_p_margin\">\n<p>\n          #!\/usr\/bin\/env python<br \/>\n          <br \/>\n          # -*- coding: CP949 -*-<br \/>\n          <br \/>\n          #<br \/>\n          <br \/>\n          # generated by wxGlade 0.7.2 on Tue Apr 05 01:49:01 2016<br \/>\n          <br \/>\n          #<\/p>\n<p>          import wx<\/p>\n<p>          # begin wxGlade: dependencies<br \/>\n          <br \/>\n          import gettext<br \/>\n          <br \/>\n          # end wxGlade<\/p>\n<p>          # begin wxGlade: extracode<br \/>\n          <br \/>\n          # end wxGlade<\/p>\n<p>\n          class MainPlotFrame(wx.Frame):<br \/>\n          <br \/>\n          canvas = 1<\/p>\n<p>          x00=0<br \/>\n          <br \/>\n          y00=0<br \/>\n          <br \/>\n          def __init__(self, *args, **kwds):<br \/>\n          <br \/>\n          # begin wxGlade: MainPlotFrame.__init__<br \/>\n          <br \/>\n          kwds[&#8220;style&#8221;] = wx.DEFAULT_FRAME_STYLE<br \/>\n          <br \/>\n          wx.Frame.__init__(self, *args, **kwds)<br \/>\n          <br \/>\n          self.canvas = wx.StaticBitmap(self, -1, wx.Bitmap(&#8220;sample.png&#8221;, wx.BITMAP_TYPE_ANY))<br \/>\n          <br \/>\n          self.canvas.Bind(wx.EVT_LEFT_DOWN, self.positionnow)<\/p>\n<p>          self.__set_properties()<br \/>\n          <br \/>\n          self.__do_layout()<br \/>\n          <br \/>\n          # end wxGlade<\/p>\n<p>          def __set_properties(self):<br \/>\n          <br \/>\n          # begin wxGlade: MainPlotFrame.__set_properties<br \/>\n          <br \/>\n          self.SetTitle((&#8220;frame_1&#8221;))<br \/>\n          <br \/>\n          self.SetSize((1024, 768))<br \/>\n          <br \/>\n          # end wxGlade<\/p>\n<p>          def __do_layout(self):<br \/>\n          <br \/>\n          # begin wxGlade: MainPlotFrame.__do_layout<br \/>\n          <br \/>\n          sizer_1 = wx.BoxSizer(wx.VERTICAL)<br \/>\n          <br \/>\n          self.SetSizer(sizer_1)<br \/>\n          <br \/>\n          self.Layout()<br \/>\n          <br \/>\n          # end wxGlade<\/p>\n<p>          def positionnow(self, event):<br \/>\n          <br \/>\n          self.x00=wx.MouseEvent.GetX(event)<br \/>\n          <br \/>\n          self.y00=wx.MouseEvent.GetY(event)<br \/>\n          <br \/>\n          print((wx.MouseEvent.GetX(event),wx.MouseEvent.GetY(event)))<br \/>\n          <br \/>\n          self.drawTick(self.x00,self.y00,self.x00+100,self.y00-30)<br \/>\n          <br \/>\n          def drawTick(self, x0, y0, x1, y1):<br \/>\n          <br \/>\n          self.mydc = wx.MemoryDC()<br \/>\n          <br \/>\n          frame_main.canvas2 = wx.Bitmap(&#8220;sample.png&#8221;, wx.BITMAP_TYPE_ANY)<br \/>\n          <br \/>\n          self.mydc.SelectObject(self.canvas2)<br \/>\n          <br \/>\n          self.mydc.SetPen(wx.Pen(self.colorDecision(),1))<\/p>\n<p>          self.mydc.DrawLine(x0, y0, x1, y1)<br \/>\n          <br \/>\n          self.mydc.SelectObject(wx.NullBitmap)<br \/>\n          <br \/>\n          self.canvas.SetBitmap(self.canvas2)<br \/>\n          <br \/>\n          self.mydc = None<br \/>\n          <br \/>\n          self.canvas = wx.StaticBitmap(self, -1, self.canvas2)<br \/>\n          <br \/>\n          return 0<\/p>\n<p>          def colorDecision(self):<br \/>\n          <br \/>\n          return wx.Colour(255, 0,0)<\/p>\n<p>\n          # end of class MainPlotFrame<br \/>\n          <br \/>\n          # end of class MainPlotFrame<br \/>\n          <br \/>\n          if __name__ == &#8220;__main__&#8221;:<br \/>\n          <br \/>\n          app = wx.App(0)<br \/>\n          <br \/>\n          #~ wx.InitAllImageHandlers()<br \/>\n          <br \/>\n          frame_main = MainPlotFrame(None, -1, &#8220;&#8221;)<br \/>\n          <br \/>\n          frame_main.Show()<br \/>\n          <br \/>\n          app.MainLoop()<\/p>\n<p>\n\n<\/p>\n<p>\n          &#8212;\n         <\/p>\n<p>\n          \uc5b8\uc820\uac00\ub294 \uc368\uba39\uaca0\uc9c0&#8230;\n         <\/p>\n<p>\n\n<\/p>\n<div style=\"width:100%;margin-top:30px;clear:both;height:30px\">\n<div style=\"width:31px;float:left;\">\n<a href=\"\/toolbar\/popup\/abuseReport\/?entryId=3638\" onclick=\"window.open(this.href, 'tistoryThisBlogPopup', 'width=550, height=510, toolbar=no, menubar=no, status=no, scrollbars=no'); return false;\"><br \/>\n<img data-recalc-dims=\"1\" decoding=\"async\" alt=\"\uc2e0\uace0\" src=\"https:\/\/i0.wp.com\/t1.daumcdn.net\/tistory_admin\/static\/ico\/ico_spam_report.png\" style=\"border:0\"\/><br \/>\n<\/a>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>#!\/usr\/bin\/env python # -*- coding: CP949 -*- # # generated by wxGlade 0.7.2 on Tue Apr 05 01:49:01 2016 # import wx # begin wxGlade: dependencies import gettext # end wxGlade # begin wxGlade: extracode # end wxGlade class MainPlotFrame(wx.Frame): canvas = 1 x00=0 y00=0 def __init__(self, *args, **kwds): # begin wxGlade: MainPlotFrame.__init__ kwds[&#8220;style&#8221;] = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-10794","post","type-post","status-publish","format-standard","hentry","category-12"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8o6gA-2O6","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts\/10794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10794"}],"version-history":[{"count":0,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts\/10794\/revisions"}],"wp:attachment":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10794"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}