Re: Strange display with Phoenix version

OuBen DiDon <[email protected]>
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
UP !

If something has a key for this problem, i'm always searching for a 
solution...



Le samedi 24 janvier 2015 14:15:58 UTC+1, OuBen DiDon a écrit :
>
> Hi there !
>
> After many hours searching the solution to my problem on the web, i'm 
> still being stuck... Here is the displaying problem :
>
> As a beginner in programming, i've done a graphic interface thanks to 
> WxPython, to display some values for a text file, wich works perfectly with 
> the classic version of WxPython.
>
> Exactly the same code in Phoenix resulting a "flatten" graph in y 
> direction within few pixels... I really don't understand why...
>
> I just create basically a Paint Dc to display a graph with X and Y 
> orientation. In Phoenix the Y axis is totally flattened and the basic 
> legend associated is unreadable !... This also appeared with wxpython 
> classic in windows XP, but works perfectly with wxpython classic in windows 
> 7... 
>
>
>
>
> Here is a piece of my OnPaint methode :
>
>     def OnPaint(self, event):
>         self.dc = wx.PaintDC(self)
>         self.dc.Clear()
>
>         self.dc.SetBrush(wx.Brush('#ffffff', wx.TRANSPARENT))
>         self.dc.SetPen(wx.Pen((100,100,100),style=wx.SOLID))
>         self.dc.DrawRectangle(10, 10, 210, 30)
>
>         if self.Cadre_situation == 1:
>             self.dc.SetPen(wx.Pen('#FF0000'))
>             self.dc.DrawRectangle(460, 528, 330, 80)
>
>         self.dc.SetDeviceOrigin(330, 178)
>         self.dc.SetAxisOrientation(True, True)
>         self.dc.SetPen(wx.Pen('#4169E1'))
>         # font = self.dc.GetFont()
>         font = wx.Font(11, wx.FONTFAMILY_DEFAULT, wx.FONTSTYLE_NORMAL, 
> wx.NORMAL)
>         font.SetPointSize(8.5)
>         self.dc.SetFont(font)
>         self.dc.DrawLine(1, 1, 530, 1)
>         self.dc.DrawLine(1, 1, 1, 120)
>
>         Increment = 0
>         for i in range(0, 140, 20): 
>             self.dc.DrawText(str(self.Max_Echelle / 6 * Increment) + ' 
> m3/sec', -75, i+10)
>             self.dc.DrawLine(2, i, -5, i)
>             Increment += 1
>
>         for i in range(140, 590, 150):
>             self.dc.DrawLine(i+5, 7, i+5, -7)
>             self.dc.DrawLine(1, 7, 1, -7)
>         for i in range(4):
>             self.dc.DrawText(self.times[i], i*150-40, -12)
>
>         self.dc.SetPen(wx.Pen('#4169E1'))
>         for i in range(10, 310, 10):
>             self.dc.DrawSpline(self.data)
>             
>         self.dc.DrawLine(1 + 2 * self.Nombre_de_reculs, 1, 1 + 2 * 
> self.Nombre_de_reculs, 120)
>
>         self.dc.SetPen(wx.Pen('#FF00FF'))
>         for i in range(10, 310, 10):
>             self.dc.DrawSpline(self.discharge_gaul)
>
>         self.dc.SetPen(wx.Pen('#4169E1'))
>         self.dc.SetDeviceOrigin(860, 178)
>         self.dc.DrawLine(1, 1, 1, 120)
>         for i in range(0, 121, 20): 
>             self.dc.DrawText(str((i)/20) + ' m', 10, i+10)
>             self.dc.DrawLine(2, i, -5, i)
>         event.Skip()
>
>
>
> ...Thanks in advance for your help ! =)
>
>

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.