Recherche avancée

Médias (91)

Autres articles (71)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (8432)

  • configure : link to libatomic when it's present

    19 janvier 2022, par Anton Khirnov
    configure : link to libatomic when it's present
    

    C11 atomics in some configurations (e.g. 64bit operations on ppc64 with
    GCC) require linking to libatomic.

    Fixes #9275

    • [DH] configure
  • configure : add hls demuxer link dependencies

    19 octobre 2021, par Limin Wang
    configure : add hls demuxer link dependencies
    

    Fixes building with —disable-everything —enable-demuxer=hls

    Signed-off-by : Limin Wang <lance.lmwang@gmail.com>

    • [DH] configure
  • How to select a rectangle of the screen to capture by dragging mouse on transparent background with wxPython ?

    4 août 2019, par makrottk

    I’m working on building an application to capture screen with ffmpeg and would like to determine the portion of the screen to capture by dragging the mouse, drawing a rectangle and passing the arguments to the ffmpeg call.

    I’m using wxPython to build a simple GUI for the application. I’ve gotten to the point where I can draw the rectangle and get the coordinates that I want : offset and size of the selected area.

    import wx

    global selectionOffset, selectionSize

    selectionOffset = ""
    selectionSize = ""

    class SelectableFrame(wx.Frame):

       c1 = None
       c2 = None

       def __init__(self, parent=None, id=wx.ID_ANY, title=""):
           wx.Frame.__init__(self, parent, id, title, size=wx.DisplaySize(), style=wx.TRANSPARENT_WINDOW)

           self.Bind(wx.EVT_MOTION, self.OnMouseMove)
           self.Bind(wx.EVT_LEFT_DOWN, self.OnMouseDown)
           self.Bind(wx.EVT_LEFT_UP, self.OnMouseUp)
           self.Bind(wx.EVT_PAINT, self.OnPaint)

           self.SetCursor(wx.Cursor(wx.CURSOR_CROSS))

       def OnMouseMove(self, event):
           if event.Dragging() and event.LeftIsDown():
               self.c2 = event.GetPosition()
               self.Refresh()

       def OnMouseDown(self, event):
           self.c1 = event.GetPosition()

       def OnMouseUp(self, event):
           self.SetCursor(wx.Cursor(wx.CURSOR_ARROW))
           self.Destroy()

       def OnPaint(self, event):
           global selectionOffset, selectionSize
           if self.c1 is None or self.c2 is None: return

           dc = wx.PaintDC(self)
           dc.SetPen(wx.Pen('red', 1))
           dc.SetBrush(wx.Brush(wx.Colour(0, 0, 0), wx.TRANSPARENT))

           dc.DrawRectangle(self.c1.x, self.c1.y, self.c2.x - self.c1.x, self.c2.y - self.c1.y)
           selectionOffset = str(self.c1.x) + "x" + str(self.c1.y)
           selectionSize = str(abs(self.c2.x - self.c1.x)) + "x" + str(abs(self.c2.y - self.c1.y))
       def PrintPosition(self, pos):
           return str(pos.x) + "x" + str(pos.y)


    class MyApp(wx.App):

       def OnInit(self):
           frame = SelectableFrame()
           frame.Show(True)
           self.SetTopWindow(frame)

           return True


    app = MyApp(redirect=False)
    app.MainLoop()
    print("offset: " + selectionOffset + ". Screen selection size: " + selectionSize)

    The problem is I can’t get the "background" to be transparent so I can see which portion of the screen I’m really grabbing. How can I do that with wxPython ? If there’s an easier way with another GUI tool or python module I’m open to suggestions. Thanks !