realbasic-nug
[Top] [All Lists]

Best way...

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Best way...
From: Alexander Bauza <alexander at auyantepui dot com>
Date: Fri, 31 Mar 2006 09:23:34 -0400
Delivered-to: realbasic-nug at lists dot realsoftware dot com
It is the situation:

I have to create a big picture made with several pictures (width and height are not the same). I've been trying a lot of ways to do it faster but I need it more optimized and faster.

Any hint???

It is the current way:

For i = 0 To TotalPictures

        MyPic = CreatePicture
        ArrayPicture.Append MyPic
        SumHeight = SumHeight + MyPic.Height

        If MaxWidth < MyPic.Width Then
                MaxWidth = MyPic.Width
        End If

Next

MyBigPic = NewPicture(MaxWidth, SumHeight, 32)

For i = 0 To TotalPictures

        MyBigPic.Graphics.DrawPicture (ArrayPicture(i), 0, h)
        h = h + ArrayPicture(i).Height

Next

Return MyBigPic



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>
  • Best way..., Alexander Bauza <=