Results 1 to 2 of 2

Thread: [RESOLVED] about graphics effects

Threaded View

  1. #1

    Thread Starter
    PowerPoster joaquim's Avatar
    Join Date
    Apr 2007
    Posts
    3,964

    Resolved [RESOLVED] about graphics effects

    i'm not sure if these is the right place for these question or if it's the COM and Activex section, but is about graphics effects.
    i will put the entire code(is a groupproject for test and build an activex control) here, for be more easy...
    in teste form i have 4 sections for see that some graphics doesn't work(or are ignored).
    i wanted see the 1st one graphic effect and test in 4 sections:
    heres the code for flip(mirror) an image in mdlGraphics module:


    Code:
    Public Sub Mirr(picSource As PictureBox, picDestiny As PictureBox, Espelho As MirrorEffects)
        If Espelho = Normal Then Exit Sub
        picDestiny.Picture = LoadPicture("")
        picDestiny.Cls
        px = picSource.ScaleWidth
        py = picSource.ScaleHeight
        picDestiny.Width = picSource.Width
        picDestiny.Height = picSource.Height
        If Espelho = Horizontal Then
            StretchBlt picDestiny.hdc, px, 0, -px, py, picSource.hdc, 0, 0, px, py, SRCCOPY
        ElseIf Espelho = Vertical Then
            StretchBlt picDestiny.hdc, 0, py, px, -py, picSource.hdc, 0, 0, px, py, SRCCOPY
        ElseIf Espelho = VerticalHorizontal Then
            StretchBlt picDestiny.hdc, px, py, -px, -py, picSource.hdc, 0, 0, px, py, SRCCOPY
        End If
    End Sub
    espelho=a mirror variable enum...
    and i have these method, in usercontrol, for mirror(flip) an image:
    Code:
    Public Sub GraphicMirror(Mirror As MirrorEffects)
        Dim i As Integer
        Dim blnAnimation As Boolean
        blnAnimation = tmrAnimation.Enabled
        For i = 0 To PicAnimation.Count - 1
            If i = 0 And Strip.Activate = True Then i = i + 1
            Call Mirr(PicAnimation(i), picGraphicsEffects, Mirror)
            PicAnimation(i).Picture = Nothing
            PicAnimation(i).Picture = picGraphicsEffects.Image
        Next i
        If blnAnimation = True Then tmrAnimation.Enabled = Ambient.UserMode
    End Sub
    in Gif Animator section is work perfetly, but in others no... why?
    the picanimation array(for subimages) is in pixel, in scalemode, like others objects in these sprite control.
    can anyone help me?
    thanks
    Last edited by joaquim; Jul 24th, 2008 at 07:59 PM.
    VB6 2D Sprite control

    To live is difficult, but we do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width