Woops, hit the send key...like this:
If localGrp = Nil And localPic <> Nil Then
sg = ScalePicture( localPic, Me.Width - 15 , Me.Height - 15 )
g.PenWidth = Me.Width/72
g.Penheight = Me.Height/72
sg.Transparent = 1
g.UseOldRenderer = True
g.DrawPicture sg, Me.Width- sg.Width, Me.Height-sg.Height
Me.localPic = sg
Else
If localGrp <> Nil then
osc = localGrp.Scale
bdr = 30
cw = Me.Width - bdr
ch = Me.Height - bdr
pw = picw
ph = pich
sc = Min( cw/pw, ch/ph )
scpw = sc*pw
scph = sc*ph
picx = ( (cw-scpw)+(bdr/2) )/2
picy = (( (ch-scph)+(bdr/2) )/2)+bdr/2
If sc <> osc Then
localGrp.Scale = sc
result = locBBox.Get( Me, localGrp, g )
End If
g.UseOldRenderer = True
g.Bold = true
g.PenWidth = 1
g.DrawObject( localGrp, picx, picy )
End If
End If
Now both these use a picture, depending on whether there is vector info
available or not. So if the localGrp is Nil, then it knows that its a
raster and uses localPic. It does scale them both, vector side with a bbox
method to get it in the right place and they both do show on windows, but as
I said, the Win version is raster no matter what coming through the Qtime
stuff.
Maybe its due to OldRenderer? Also freaky is that OldRenderer is waaaay
faster for displaying the vector stuff when supposedly Quartz handles this
better - go figure.
ScalePicture does this (I got it from a kind soul on the list):
// Scales a picture to fit into given constraints.
// If maxWidth or maxHeight are zero, the original size is assumed.
dim dest as Picture
dim targetWidth, targetHeight as integer
dim ScaleWidth, ScaleHeight, OverallScale as Double
// If argumets are misssing, bail out.
if (src=nil) or ((maxWidth=0) and (MaxHeight=0)) then
return nil
end if
// Calculate the horizontal and vertical scale
if maxWidth>0 then
ScaleWidth = maxWidth*2/src.Width
else
ScaleWidth = 1
End If
if MaxHeight > 0 then
ScaleHeight = MaxHeight*2 / src.Height
else
ScaleHeight = 1
end if
// Use the lower of the both scales, to preserve aspect ratio
OverallScale = Min(ScaleWidth, ScaleHeight)
// Calculate new picture size
TargetWidth = src.Width * OverallScale/2
TargetHeight = src.Height * OverallScale/2
// Create new picture
dest = NewPicture(TargetWidth, TargetHeight, 8)
// Draw the source picture scaled into the new one
dest.Graphics.UseOldRenderer = True
dest.Graphics.DrawPicture src, 0, 0, TargetWidth, TargetHeight, 0,
0,src.Width, src.Height
return dest
HTH,
-seanA
_______________________________________________
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>