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
 Problem ImageEnVect.UpdateRect in v7.5.0

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 - Jan 03 2018 : 11:31:19
Hello,
I have been using the following procedure as a brush for many years.
Since the new version 7.5.0 I have problems.
It will always display a white square when painting.
That's the same with the PaintPenMarker.
What can I do, you can check the problem.
When i use imageenvect.update, then all OK but slow.
imageenvect.UpdateRect() works quickly.

// Source Example:
if painting then
begin
  px_source := snap_form.imageenview1.bitmap.Scanline[yo];
  px_dest := ImageEnVect.IEBitmap.Scanline[yo];
  for rax := -ra_brush to ra_brush do
  begin
    quellfarbe := rgb(px_source[xo].r, px_source[xo].g, px_source[xo].b);
    zielfarbe := rgb(px_dest[xo].r, px_dest[xo].g, px_dest[xo].b);
    fa := clonmischfarbe(quellfarbe, zielfarbe);
    px_dest[xo] := TColor2TRGB(fa);
  end
end
else
   ActiveChild.ImageEnVect.Proc.PaintPenMarker(bx, by, 2 * ra_brush,brush_color, magicbrush_color, Deckung);

   toolrect.Top := by - ray;
   toolrect.Left := bx - rax;
   toolrect.Bottom := by + ray;
   toolrect.Right := bx + rax;
   ImageEnVect.UpdateRect(toolrect):




Best regards

Klaus
www.klausdoege.de
3   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jan 04 2018 : 20:58:29
Hi Klaus

There is too many unknown variables in your example code to reproduce the issue. Can you give me something simpler?

Nigel
Xequte Software
www.imageen.com
klausdoege Posted - Jan 04 2018 : 09:11:37
Hi Bill,
with ImageEnVect.UpdateRect(toolrect, true)
I have the same effect, a white square.
-------------------------------------------
Now I changed it as follows and it works perfect.
ImageEnVect.LockPaint;
ImageEnVect.UpdateRect(toolrect)
ImageEnVect.UnLockPaint;
-------------------------------------------
ImageEnVect.LockPaint;
ImageEnVect.UpdateRect(toolrect, true)
ImageEnVect.UnLockPaint;
It works, but it's slower.
-------------------------------------------
Maybe you can consider and change this in the next version.

Klaus
www.klausdoege.de
w2m Posted - Jan 03 2018 : 14:16:45
UpdateRect includes new parameters in 7.5:
Declaration

procedure UpdateRect(rclip: TRect; UpdateNow: Boolean = false);

Description
Updates the specified rectangle. Use this function instead of Update when only a portion of the image has changed.
If UpdateNow is True then the window is updated immediately (bypassing the application queue).

so try this:
imageenvect.UpdateRect(toolrect, True)

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