ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Wrong background when rotate text.
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

adisonx

Thailand
29 Posts

Posted - Mar 08 2016 :  22:29:23  Show Profile  Reply
I created layer of text
TFontStyles fs1;
fs1 << fsBold;
TColor grayColor = TColor(RGB(109, 109, 109));
this->ImageEnView->LayersCreateFromText("Cancel","Tahoma",200,clBlack,fs1,false,3,0,0,true);
this->ImageEnView->CurrentLayer->Opacity = 0.5;
this->ImageEnView->CurrentLayer->Rotate =45;

It 's show gray backgroud ,but I want transparent background that shown before rotate.
Please give me some guide.Thank you.



w2m

USA
1990 Posts

Posted - Mar 09 2016 :  09:48:29  Show Profile  Reply
You do not have to rotate the layer because LayersCreateFromText can rotate the text for you. The rotation and opacity is handled automatically by LayersCreateFromText. Try adding this to the Vectorial Demo:

procedure TMainForm.CreateTextLayer1Click(Sender: TObject);
begin
  ImageEnVect1.LayersCreateFromText('Cancel', 'Segoe UI', 200, TColor(RGB(109, 109, 109)), [fsBold],
    False, 3, 0, -45, True);
  { Convert white to transparent - not required, this is handled automatically by LayersCreateFromText }
  //ImageEnVect1.Proc.SetTransparentColors(CreateRGB(255, 255, 255), CreateRGB(255, 255, 255), 0 );
  ImageEnVect1.Update;
  ImageEnVect1.Fit;
end;



Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: