Author |
Topic  |
spetric
  
Croatia
308 Posts |
Posted - Dec 23 2016 : 02:39:09
|
Hi Yogi,
I think you mean something like this:

I have this option in Pixopedia and it can draw strokes around selection (actually it can draw strokes around multiple selections). There is no difference between polyline/polygon drawing and selection drawing, as selection is polygon.
However, in this version of dll (let's call it 0.1) I did not implement polyline/polygon drawing (it's actually inside dll, but not exposed).
I will add it in next version (together with selection clipping).
|
 |
|
yogiyang
   
India
730 Posts |
Posted - Dec 23 2016 : 23:07:55
|
Hello spetric,
Yes! that is exactly what I am talking about.
TIA
Yogi Yang |
 |
|
klausdoege
  
Germany
389 Posts |
Posted - Dec 27 2016 : 12:48:40
|
Hello Spektric, Unfortunately, I can not test the demo, the TCX components are missing. But it looks very promising.
Klaus www.klausdoege.de |
 |
|
spetric
  
Croatia
308 Posts |
Posted - Jan 11 2017 : 16:09:53
|
I've built a new version of the spEngine (32 and 64-bit). There are lot of changes and additional functions, such as drawing ellipse/rectangle/polyline/polygon programmatically. All objects (including ellipse and rectangle) can be rotated by given angle.
I even wrote a manual (PDF), partially, because in the next version there will be some changes in structures, but not the parameters already in use. To avoid usurping the space on ImageEn forum, you can download the library from my site:
http://www.sigmapi-design.com/archive/spEngine.zip
Library is free but donations are welcomed
|
 |
|
w2m
   
USA
1990 Posts |
Posted - Jan 12 2017 : 14:28:35
|
I am studying the new spEngine demo. I find that nothing is drawn in OnMouseDown. I am using a solid brush. It seems like a single solid ellipse should be drawn in OnMouseDown, but it does not. Does your demo draw a single ellipse in the OnMouseDown event?
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
 |
|
spetric
  
Croatia
308 Posts |
Posted - Jan 12 2017 : 14:53:31
|
Hi Bill,
In demo program, in OnMouseDown event nothing is drawn, because both ellipse radius are 0:
PaintView.ObjLeft[_hobj] := X;
PaintView.ObjTop[_hobj] := Y;
PaintView.ObjWidth[_hobj] := 0;
PaintView.ObjHeight[_hobj] := 0;
OnMouseDown event is used to prepare ellipse for drawing and temporary iekEllipse object is created.
In OnMouseMove event, you actually "stretch" the ellipse:
rect.left := MouseData.X_down;
rect.top := MouseData.Y_down;
rect.right := MouseData.X_move_to;
rect.bottom := MouseData.Y_move_to;
rect.NormalizeRect;
PaintView.ObjLeft[_hobj] := rect.left;
PaintView.ObjTop[_hobj] := rect.top;
PaintView.ObjWidth[_hobj] := rect.Width;
PaintView.ObjHeight[_hobj] := rect.Height;
In OnMouseUp event iekEllipse object is removed and rendering is performed according to given parameters. |
 |
|
w2m
   
USA
1990 Posts |
Posted - Jan 12 2017 : 14:58:35
|
I am using a solid brush, not an object.
Shouldn't this draw?
if AShapeType = px_shpFreeHand then
speHandMouseDown(Shift, X, Y) <<==== Draw Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
 |
|
spetric
  
Croatia
308 Posts |
Posted - Jan 12 2017 : 15:38:29
|
Oh, I see...you are using "free hand" drawing, not en ellipse.
In OnMouseDown event, actually in speHandMouseDown(Shift, X, Y) API, nothing is drawn, because internally "free hand" drawing calculates points on the Bresenham's line and so I need two points X_from,Y_from -> X_to, Y_to.
Furthermore, not all points on the line (X_from,Y_from, X_to, Y_to) are taken into the account, because it depends on the step set (default is 2).
Actual drawing with "free hand" option is performed in OnMouseMove event (speHandMouseMove(Shift, X, Y) API).
BTW, clear button in demo program does not work correctly, I must correct this.
|
 |
|
w2m
   
USA
1990 Posts |
Posted - Jan 12 2017 : 15:40:31
|
ok, thanks... but to be useful in many cases I think OnMouseDown with "freehand" drawing should somehow draw.
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
 |
|
spetric
  
Croatia
308 Posts |
Posted - Jan 12 2017 : 16:02:27
|
Yes, you're right, it should draw a brush tip at point (X,Y). I'll add an option for that in the next version, something like DrawOnMouseDown := True/False; and then exclude that point from line drawing in OnMouseMove event.
However, it will work only in slow rendering mode (because of filters).
While I was running demo program, I found a bug exactly in free hand drawing. In on shape's MouseUp event it was written:
bool TGrapHand::MouseUp(TShiftState Shift, int X, int Y)
{
return TGrapBasic::MouseMove(Shift, X, Y);
// It should be MouseUp from the base class!!!
}
And that's the reason why clear button did not work correctly, actually free hand drawing in MouseUp event did not clear mask under the bounding rectangle. I'll upload corrected dlls tomorrow.
|
 |
|
w2m
   
USA
1990 Posts |
|
spetric
  
Croatia
308 Posts |
Posted - Jan 12 2017 : 17:22:51
|
Done.
http://www.sigmapi-design.com/archive/spEngine.zip
If RenderParams.DrawTipOnMouseDown := True; (as in new demo version) brush tip is drawn in onMouseDown (for free hand shape). It will work for all rendering modes. I used a dirty trick and internally created a line (x,y -> x+1,y) and rendered only the first pixel. Bug in speHandMouseUp API corrected. |
 |
|
spetric
  
Croatia
308 Posts |
Posted - Jan 30 2017 : 18:22:38
|
I made a little dll (32-bit only) that can load and execute 8bf plug-ins:

The same model as with drawing engine, but much simpler. Only ten functions and one typedef. I even wrote a Delphi demo and unbelievable, it works...well, for most filters (some newer ones tend to crash badly).
Here is the zip file: http://www.sigmapi-design.com/archive/spHost.zip
Have fun, Siniša
|
 |
|
xequte
    
39143 Posts |
|
w2m
   
USA
1990 Posts |
Posted - Mar 03 2017 : 14:57:12
|
[font=Arial]Scanning And Handling Multiframe TIFF Images By Bill Miller Adirondack Software & Graphics Full Source Demo Project Compiled with Delphi 10 Seattle
This is a beta demo that handles scanning, processing and creating multiframe TIFF files.

You may download it here:
http://www.ImageEn.com/files/WMDemos/ScanAndSaveTIFF.zip 3190.51 KB
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
 |
|
xequte
    
39143 Posts |
|
w2m
   
USA
1990 Posts |
Posted - Apr 20 2017 : 13:26:36
|
ImageEn 7.0 MultiFrame Editor Demo With Frames, Layers and Brush Paint With IEBitmap Canvas And Alpha Channel By Bill Miller Adirondack Software & Graphics Full Source Demo Project Compiled with Delphi 10 Seattle
Requires Delphi Seattle or Higher Requires ImageEn Version 7.0 or Higher
This project supports multiframes, ImageEn version 7.0 image, text and shape layers, brush, line, rectangle and round rectaangle painting with IEBitmap, AlphaChannel and GDICanvas, PDF images with optional support for the WPCubed PDF PlugIn, printing, scanning, deskew and crop, resample, resize, croptool, curves, filling IEColorPalette with custiom palettes, and VCL Themeing and Styles. To support PDF images, obtain the WPCubed PDF PlugIn and uncomment the pdf code where indicated.

You may download it here: http://www.ImageEn.com/files/WMDemos/ImageEnLayersPaintbrush.zip 3594.96 KB
Bill Miller Adirondack Software & Graphics[/b] Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development |
 |
|
w2m
   
USA
1990 Posts |
Posted - Apr 28 2017 : 08:33:44
|
ImageEn Version 7 Native File Formats With Image, Text, Shape, Polyline and Line Layers With Undo Update 1 By Bill Miller Adirondack Software & Graphics Full Source Demo Project Compiled with Delphi 10 Seattle

This demo is similar to the AllLayers Demo but adds Polyline custom Shapes and Loading and Saving to ImageEn Native file format (*ien) as well as Undo. Standard image types such as JPEG and BMP, do not support layers, so to preserve layer information this demo supports the ImageEn Native Format (*.ien) that loads and saves all layer information in the *.ien file.
Download Source and EXE: http://www.ImageEn.com/files/WMDemos/ImageEnAllLayerTypes.zip 3359.45 KB
Bill Miller Adirondack Software & Graphics Email: w2m@hughes.net EBook: http://www.imageen.com/ebook/ Custom Commercial ImageEn Development
|
 |
|
yogiyang
   
India
730 Posts |
Posted - Jun 16 2017 : 07:53:48
|
Thanks Bill for the code sample.
It is useful for me in many ways.
Yogi Yang |
 |
|
DianaWelch
USA
4 Posts |
Posted - Jun 16 2017 : 21:36:01
|
Yeah, it's really a big help. I didn't even realize that I can do that particular effect. Thumbs up for this! |
 |
|
Topic  |
|