hi,
I need help for transparency picture
I’m using einhugur plugin pictureeffect
with the demo shapedistort i would have a picture with transparent oval inside.
But nothing works. einhugur said me this.
[i][b]Your supposed to draw the mask before you distort
So its like
-
Create your picture and draw into it.
-
Draw its mask
-
Distort picture
-
Distort mask of the original picture (using same distort method as you used on your image)
-
Apply the distorted mask to the Distorted picture by doing MyImage.Mask = MyDistortedMask.
-
Draw your picture (it will draw with the defined transparency)
[/b][/i]
I am trying many solutions but I’m wrong. I have always a white oval but not transparent.
I write here the code
[code] Dim pg as PolygonF
MyImageLocation = new PointF()
frame = NewFrame.VecNorm(MyImageLocation)
effect = new ShapeDistortEffect()
effect2 = new ShapeDistortEffect()
function effect // plugin pictureeffect einhugur
////////////////////
// create image in runtime
//replace the Dimmuborgir image
dim pic,MyDistortedMask as picture
pic = new picture(200,200,32)
// color all pic in red
pic.Graphics.ForeColor = &cFF000000
pic.Graphics.FillRect 0,0,200,200
// add white oval ( i would like is transparent when draw it )
pic.Graphics.ForeColor = &cFFFFFF00
pic.Graphics.FillOval 100,100,50,50
pic.mask =pic
/// apply effect /////////////////////////////////////
MyImage = effect.Apply(EnsurePictureBits(pic,32),frame)
MyDistortedMask = new picture(200,200,32)
// color all pic in red
MyDistortedMask.Graphics.ForeColor = &c00000000
MyDistortedMask.Graphics.FillRect 0,0,200,200
// add white oval ( i would like is transparent when draw it )
MyDistortedMask.Graphics.ForeColor = &cFFFFFF00
MyDistortedMask.Graphics.FillOval 100,100,50,50
MyDistortedMask = effect2.Apply(EnsurePictureBits(MyDistortedMask,32),frame)
MyImage.Mask = MyDistortedMask
//MyImage.Mask = NewPicture(MyImage.Width,MyImage.Height,32)
//MyImage.Transparent =1
pg = NewFrame.VecNorm(new PointF(0.0,0.0))
pg.Fill(MyImage.mask.Graphics)
Window1.Invalidate(false)
[/code]
if someone know this example
thanks