When I paste the image (not bitmap) in SRichViewEdit1 (5.1) it decreases considerably in size (in the example richview action text)
I've tried changing compile using pngimage correctly, but also did not work.
any idea about this occurrence?[/img]
SRichViewEdit paste image (not bitmap)
-
- Site Admin
- Posts: 17520
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
image small size in paste
Load microsoft word, insert an object forms and get a arrow. Then paste it into the editor richview-action test I mentioned. If you type any text after the image is reduced substantially. Menu (action
special collar) certifies that this is the type metafile.
I tested with other pictures of other editors that generate metafile, when pasting in editor richview mentioned, the same thing happens.
At first I could not identify (I have no experience in TRichView) a property in Srichview or action that could keep the image. If you confirm this, would tell me how can I code in force this type of image to be glued to stay with the same size (default)?
special collar) certifies that this is the type metafile.
I tested with other pictures of other editors that generate metafile, when pasting in editor richview mentioned, the same thing happens.
At first I could not identify (I have no experience in TRichView) a property in Srichview or action that could keep the image. If you confirm this, would tell me how can I code in force this type of image to be glued to stay with the same size (default)?
image reduction
I discovered (as the code below) that comment the lines below the image becomes glued normally without suffering the reduction
caused (incorrectly?) By methods SetExtraIntProperty
Unit RVEdit ...
...function TCustomRichViewEdit.PasteMetafile
...
w := wmf.Width;
h := wmf.Height;
...
...InsertPicture(s,wmf,DefaultPictureVAlign);
if (GetCurrentItem is TRVGraphicItemInfo) and
(TRVGraphicItemInfo(GetCurrentItem).Image = wmf) then begin
// GetCurrentItem.SetExtraIntProperty(rvepImageWidth, w);
// GetCurrentItem.SetExtraIntProperty(rvepImageHeight, h); end;
What you consider Sergey?
caused (incorrectly?) By methods SetExtraIntProperty
Unit RVEdit ...
...function TCustomRichViewEdit.PasteMetafile
...
w := wmf.Width;
h := wmf.Height;
...
...InsertPicture(s,wmf,DefaultPictureVAlign);
if (GetCurrentItem is TRVGraphicItemInfo) and
(TRVGraphicItemInfo(GetCurrentItem).Image = wmf) then begin
// GetCurrentItem.SetExtraIntProperty(rvepImageWidth, w);
// GetCurrentItem.SetExtraIntProperty(rvepImageHeight, h); end;
What you consider Sergey?
-
- Site Admin
- Posts: 17520
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
image metafile in past
if you just remove the named code , the menu (action) option format-> object properties will not contain parameters like width and height of the image metafile. I think that you must check the propertie SetExtraIntProperty and verity what had happened with the relation between richviewactions.
I explained this way because when you use scalerichview (edit) with "richviewactions" in the past action the bug occur. In other way the bug doen´t occur (with no richviewactions ).
See the project ...\TRichView\ScaleRichView\Demos\RVDemos\Editors\Editor 1 where the bug doesn´t occur because doesn´t use "richviewaction".
What do you think ?
I explained this way because when you use scalerichview (edit) with "richviewactions" in the past action the bug occur. In other way the bug doen´t occur (with no richviewactions ).
See the project ...\TRichView\ScaleRichView\Demos\RVDemos\Editors\Editor 1 where the bug doesn´t occur because doesn´t use "richviewaction".
What do you think ?
Complementing the previous content, I believe that making the following adjustments prove that this is not a bug:
In the project TRichView\ScaleRichView\Demos\ActionTest if you disable with comment below in oncreateform...
// measuring units
// RVA_ConvertToTwips(srvActionsResource);
// RVAControlPanel1.UnitsProgram := rvstuTwips;
// SRichViewEdit1.ConvertToTwips;
// cmbUnits.ItemIndex := ord(SRichViewEdit1.UnitsProgram);
// RVAControlPanel1.UnitsDisplay := SRichViewEdit1.UnitsProgram;
the bug does not ocurr and the object propertie work fine with richviewactions.
In the project TRichView\ScaleRichView\Demos\ActionTest if you disable with comment below in oncreateform...
// measuring units
// RVA_ConvertToTwips(srvActionsResource);
// RVAControlPanel1.UnitsProgram := rvstuTwips;
// SRichViewEdit1.ConvertToTwips;
// cmbUnits.ItemIndex := ord(SRichViewEdit1.UnitsProgram);
// RVAControlPanel1.UnitsDisplay := SRichViewEdit1.UnitsProgram;
the bug does not ocurr and the object propertie work fine with richviewactions.
-
- Site Admin
- Posts: 17520
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: