VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 12345[6]78910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 23:07:35 01/03/02 Thu
Author: Michel
Subject: Re: WMF background
In reply to: jodeye 's message, "WMF background" on 17:06:18 01/03/02 Thu


Hi Jodeye,

I have done a recent change to support that and this will official be included in version 2.

If you need this immediately you'll need to add this method to TDibGraphic:


procedure TDibGraphic.Fill( const Color : TRgb );
var
X : LongInt;
Y : LongInt;
begin
if IsEmpty then
Exit;

{ Fill the first scan line, then copy the scan line to all other lines }
for X := 0 to (Self.Width-1) do
Self.Rgb[ X, 0 ] := Color;

for Y := 1 to (Self.Height-1) do
Move( Self.ScanLine[0]^, Self.ScanLine[Y]^, Self.ScanLineSize );
end;

and add a BackgroundColor property to TMetaFileGraphic:

{ background color used when loading the metafile }
property BackgroundColor : TRgb read FBackgroundColor
write FBackgroundColor;

then in TMetaFileGraphic.SingleLoadFromStream add,

{ MB Dec 18, 2001. Use the background color specified by the user }
Self.Fill( FBackgroundColor );


just after NewImage.

Best regards,

Michel




>When I LoadFromFile a WMF image into an
>ImageScrollBox, the transparent portion of the WMF
>appears as black. Is there a way to make the
>transparent portion to appear as white?

[ Next Thread | Previous Thread | Next Message | Previous Message ]


Replies:


[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.