Author |
Topic |
|
klausdoege
Germany
389 Posts |
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 |
|
xequte
38610 Posts |
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
|
|
|
klausdoege
Germany
389 Posts |
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 |
|
|
w2m
USA
1990 Posts |
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
Germany
389 Posts |
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
USA
1990 Posts |
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 |
|
|
w2m
USA
1990 Posts |
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 |
|
|
xequte
38610 Posts |
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
|
|
|
klausdoege
Germany
389 Posts |
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
38610 Posts |
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
|
|
|
|
Topic |
|