Hi Kirt
  I liked that tiling snippet.  This is how I got rb to scale an image that I 
have as back drop in canvas1 on window1 with pic. I used a canvas because I 
wanted a bit of a frame around it.
   
   
  In Window1 Event Handlers
   
  in OPEN:
  me.width = pic.Width
  me.Height = pic.Height
   
  and in  RESIZED:
  
  me.height = pic.height*(me.width/pic.width)
  
  canvas1.Width = me.width
    canvas1.height = me.height   // in the above lines I had to add some px to 
force the pic to sit nice.
   
  THis is the first time I have worked this out: dim new pic, fill in pic, use 
pic to build PixmapShape, scale PixmapShape and then use that to redraw
  
Now in Canvas1 events:
  OPEN:
  me.width = pic.Width
  me.Height = picHeight  // sets initial size. backdrop was already filled with 
pic
  
now I used picture and PixmapShape in PAINT:
  dim p1 as Picture
  dim px as PixmapShape
  
  p1=New Picture(pic.width,pic.height,32)  // set initial frame
  p1 = pic            // stuffed in pic            
  
  px= New PixmapShape(p1)                 // here is how the scale comes in
  px.scale = me.width/pic.width               // I only wanted width to set the 
scale
  
  me.Graphics.Drawobject px,me.width/2,me.height/2  // redraw background in 
canvas1  
   
   
  I also set the background colour to black for my pic to keep the flicker 
down; my pic is dark. I used resized becase the resizing event was to 
aggressive and I couldn't dampen the flicker.
   
   cheers
Derek
   
  

Kirt Cathey <[EMAIL PROTECTED]> wrote:
  Thank you.

Figured it out. Here is the code for archives and the next soul that must
search for the truth! This is for a 16 X 16 picture.

In the windows 'Open' event, I set:
me.backdrop = mypicture

And if the paint event, the following code:

Dim i As Integer
Dim j As Integer
for i = 0 to me.width+1 Step 16
for j=0 to me.height +1 Step 16
g.drawpicture(mypicture i, j, 16, 16)
next
next



Enjoy!

--Kirt Cathey

2006/11/13, Norman Palardy :
>
>
> On Nov 11, 2006, at 9:27 PM, Kirt Cathey wrote:
>
> > To answer my own question below, I was looking into the Component X
> > plugin;
> > but the example apps with
> > Component X do not seem to work with RB 2006 R4. Can somebody
> > confirm this?
> >
> > Regards,
> > Kirt
>
> Yes.
> _______________________________________________
> Unsubscribe or switch delivery mode:
> 
>
> Search the archives of this list here:
> 
>



-- 
Kirt Cathey
WorkPapers Development
_______________________________________________
Unsubscribe or switch delivery mode:


Search the archives of this list here:



 
---------------------------------
Want to start your own business? Learn how on Yahoo! Small Business.
_______________________________________________
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>

Reply via email to