Removing All Rectangles

Discussions about document viewing.
Post Reply
DERRYT
Posts: 14
Joined: Fri Jul 03, 2015 3:05 pm

Removing All Rectangles

Post by DERRYT » Tue Dec 01, 2015 4:11 pm

Hi There

I've added Rectangles using .DrawRectangle, how do I go about removing these Rectangles.

Regards
Derry Taylor

User avatar
Loïc
Site Admin
Posts: 5570
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Removing All Rectangles

Post by Loïc » Thu Dec 03, 2015 6:24 pm

Hello Derry,

Could you illustrate what you are doing by a code snippet? So far I have no idea if you are processing bitmap or vector documents.

Kind regards,

DERRYT
Posts: 14
Joined: Fri Jul 03, 2015 3:05 pm

Re: Removing All Rectangles

Post by DERRYT » Fri Dec 04, 2015 7:08 am

Hi Loic

What I'm doing is defining OCR Zonal areas on a document, when I setup a zonal area, I show the areas I've defined on the document by doing a .DrawRectangle for each area. Now I have the ability to remove a zonal area, and I want to remove the rectangle relating to that zonal area, hope this explains it. Very similar to your OCR example.

Regards
Derry

User avatar
Loïc
Site Admin
Posts: 5570
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Removing All Rectangles

Post by Loïc » Fri Dec 04, 2015 1:24 pm

Hello Derry,

I still do not understand. Could you provide a code snippet illustrating your explanation?

Kind regards,

Loïc

DERRYT
Posts: 14
Joined: Fri Jul 03, 2015 3:05 pm

Re: Removing All Rectangles

Post by DERRYT » Tue Dec 08, 2015 3:13 pm

Hi Loic

I use the following code the draw the rectangle, I would like to remove the rectangle if need be.

if (oGdPictureImaging.DrawRectangle(m_ImageID,
LeftArea,
TopArea,
WidthArea,
HeightArea,
2,
Color.Red,
true) != GdPictureStatus.OK)
{
MessageBox.Show("Cannot Draw Rectangle.");
}

Regards
Derry

User avatar
Loïc
Site Admin
Posts: 5570
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Removing All Rectangles

Post by Loïc » Thu Dec 10, 2015 11:00 am

Hello Derry,

Since you are drawing into a raster Image the only thing you can do is to implement your own undo / redo feature by using cloned version of your bitmap. This can be done using the CreateClonedGdPictureImage() method of the GdPictureImaging class.

Please let us know if you need further information.

With best regards,

Loïc

DERRYT
Posts: 14
Joined: Fri Jul 03, 2015 3:05 pm

Re: Removing All Rectangles

Post by DERRYT » Fri Dec 18, 2015 7:09 am

Hi Loic

Thanks for that.

Regards
Derry

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests