4 messages in org.openoffice.fr.progRe: Rognure ?
FromSent OnAttachments
AladdinMar 2, 2007 8:04 am 
Francois GattoMar 2, 2007 10:27 pm 
AladdinMar 7, 2007 1:23 am 
AladdinMar 7, 2007 9:22 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Rognure ?Actions...
From:Aladdin (alad@altern.org)
Date:Mar 7, 2007 9:22:51 am
List:org.openoffice.fr.prog

Bonjour à vous,

J'essaye de retrouver le comportement de l'action du bouton Rogner de la barre d'Image avec :

Sub Main Dim img As Object, crop As Object

img = FindImage("ImageTest")

If Not isNull(img) Then crop = img.GraphicCrop crop.Right = -50 img.GraphicCrop = crop End If End Sub

Ca fonctionne, il faut juste redimensionner en plus l'image ;-)

Sub Main Dim img As Object, crop As Object Dim Taille As New com.sun.star.awt.Size

img = FindImage("ImageTest")

If Not isNull(img) Then 'Rognure crop = img.GraphicCrop crop.Right = 1000 img.GraphicCrop = crop

'Redimensionne Taille.Width = img.Size.Width - 1000 Taille.Height = img.Size.Height img.setSize(Taille)

End If End Sub