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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnProc1.rotate view not backcolor

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
klausdoege Posted - Feb 08 2019 : 09:42:05
Hello,
i use ImageEnProc1.rotate(Angle_AdvSpinEdit.floatValue, Antialiasing_CheckBox.Checked, ierfast, clred);
But the background is not changed ?
Why, in a earlier version this works fine.
What can i do ?
This is the source:
procedure TfRotate.Angle_AdvSpinEditChange(Sender: TObject);
begin
  ImageEnProc1.Undo;
  ImageEnProc1.rotate(Angle_AdvSpinEdit.floatValue, Antialiasing_CheckBox.Checked, ierfast, bcolor);
  ImageEnView1.Fit;
end;

And here a example:


Klaus
www.klausdoege.de
9   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Feb 12 2019 : 19:56:05
Hi Klaus

Yes, that is true. I will add a note to the documentation.



Nigel
Xequte Software
www.imageen.com
klausdoege Posted - Feb 12 2019 : 12:45:14
Hi Nigel,
yes that's the solution.
That should be in the documentation of
procedure Rotate(Angle: Double; AntiAliasMode: TIEAntialiasMode = ierFast; BackgroundColor: TColor = -1);
be mentioned that would be helpful.
Because without it, it will not work
not even with Bill's tip.

Klaus
www.klausdoege.de
xequte Posted - Feb 11 2019 : 19:23:07
Hi Klaus

The background color is there, it's just not shown because it is specified as transparent by the alpha channel.

To prevent it occurring, you just need to remove the alpha channel:

ImageEnView1.IEBitmap.RemoveAlphaChannel;

Nigel
Xequte Software
www.imageen.com
w2m Posted - Feb 11 2019 : 12:02:45
This works:
procedure TForm2.Rotate1Click(Sender: TObject);
begin
  ImageEnView1.BackgroundStyle := iebsSolid;
  ImageEnView1.Background := clYellow;
  ImageEnView1.Proc.Undo;
  ImageEnView1.Proc.Rotate(45, False, ierfast, clYellow);
  ImageEnView1.Fit;
end;


This does not work:
procedure TForm2.Rotate1Click(Sender: TObject);
begin
  ImageEnView1.BackgroundStyle := iebsSolid;
  ImageEnView1.Proc.Undo;
  ImageEnView1.Proc.Rotate(45, False, ierfast, clYellow);
  ImageEnView1.Fit;
end;


Perhaps you need to use Background as well?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
w2m Posted - Feb 11 2019 : 11:33:53
Ok, but your example shows ImageEnView1.BackgroundStyle := iebsSolid;
ImageEnView1.Background := clBrnFace;

and ImageEnProc1.rotate... does not have a paramter to set the backgroundstyle. So set ImageEnView1.BackgroundStyle := iebsSolid before calling ImageEnProc1.rotate(45, true, ierfast, clyellow).

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
klausdoege Posted - Feb 11 2019 : 11:17:13
Yes i know.
But i make this:
ImageEnProc1.rotate(45, true, ierfast, clyellow);
And not Background is changed ?

Klaus
www.klausdoege.de
w2m Posted - Feb 11 2019 : 10:29:58
Try
ImageEnView1.BackgroundStyle := iebsSolid;
ImageEnView1.Background := clYellow;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
klausdoege Posted - Feb 10 2019 : 03:20:20
Hi Nigel,
yes the background should be filled with the color on the right.
About as:


Klaus
www.klausdoege.de
xequte Posted - Feb 08 2019 : 16:09:15
Hi Klaus

Sorry, in what way were you wanting the background to change? This image is alpha filled in the null area when rotated. Did you want it filled with a solid color?

Nigel
Xequte Software
www.imageen.com