Recent

Author Topic: LazPaint (alpha-blending, antialiasing, filters)  (Read 650997 times)

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #195 on: April 15, 2011, 10:25:37 pm »
New version of Lazarus 3.5 with :
- 3 different resample filters
- perfect polygonal junction : for example if you draw an ellipse with a border, or a rectangle with a border. In BGRABitmap, there is now TBGRAMultishapeFiller in unit BGRAPolygon which can do this with any shapes.

It is possible now to compute wide polyline points, that is the points the makes the polygons of a line. For example, with a dotted polyline, you can get a series of polygons that draw the dots.

I'm thinking about polygonal color gradients of any shape, but I'm stuck with the question of aliased borders. Same with texture mapped polygons.

It would be great also to have more resample filters, but I feel lazy about it.
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #196 on: April 15, 2011, 10:33:12 pm »
Shaped forms can be set with shapeform() method, i do not have finded how to do it with panels.

I wish to have a transparent panel so you can see only the object on it (pictures, buttons, etc...)
and you do not see the background-panel.
I think I understand what you mean. This way you can put images over other components that are under the panel. I do not know how to do it.

I suppose it's possible. For example a TLabel has a transparent background.
Conscience is the debugger of the mind

fabienwang

  • Sr. Member
  • ****
  • Posts: 449
  • Lazarus is the best
    • My blog
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #197 on: April 15, 2011, 11:28:03 pm »
-renamed source files to *_src.zip
-created a 3.0 folder in bin/old/
-added new binaries zip for 3.5: win32 (with readme and manifest) and gtk2 (with readme)
« Last Edit: April 15, 2011, 11:58:06 pm by FabienWang »
I'm using Arch Linux.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #198 on: April 16, 2011, 12:47:09 pm »
Thanks
Conscience is the debugger of the mind

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #199 on: April 17, 2011, 04:48:02 pm »
@Circular

Quote
I think I understand what you mean. This way you can put images over other components that are under the panel. I do not know how to do it.

Yep, you get it  ;D

Quote
I suppose it's possible.

Re-yep, good news...  ::)

Thanks
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Shebuka

  • Sr. Member
  • ****
  • Posts: 427
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #200 on: April 19, 2011, 11:04:14 am »
Trying 3.5 version, new compile error:

/Developer/lazarus/components/bgrabitmap/bgradnetdeserial.pas(74,14) Error: There is no method in an ancestor class to be overridden: "TDotNetDeserialization.ToString:AnsiString;"

and what is the third resample mode? i see only two:
TResampleMode = (rmSimpleStretch, rmFineResample);

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #201 on: April 19, 2011, 12:18:03 pm »
Trying 3.5 version, new compile error:

/Developer/lazarus/components/bgrabitmap/bgradnetdeserial.pas(74,14) Error: There is no method in an ancestor class to be overridden: "TDotNetDeserialization.ToString:AnsiString;"

Sounds like an old compiler. IIRC tostring was introduced in FPC 2.4.2
 

Shebuka

  • Sr. Member
  • ****
  • Posts: 427
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #202 on: April 19, 2011, 04:34:54 pm »
Trying 3.5 version, new compile error:

/Developer/lazarus/components/bgrabitmap/bgradnetdeserial.pas(74,14) Error: There is no method in an ancestor class to be overridden: "TDotNetDeserialization.ToString:AnsiString;"

Sounds like an old compiler. IIRC tostring was introduced in FPC 2.4.2
 
Your truth, my compiler was 2.4.0, now updating it.

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #203 on: April 19, 2011, 06:27:38 pm »
and what is the third resample mode? i see only two:
TResampleMode = (rmSimpleStretch, rmFineResample);
ResampleMode indicates only if image is stretched without applying any filter, or by using filter to do a fine resample. The filter is defined by ResampleFilter property.
Conscience is the debugger of the mind

Shebuka

  • Sr. Member
  • ****
  • Posts: 427
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #204 on: April 20, 2011, 10:37:33 am »
and what is the third resample mode? i see only two:
TResampleMode = (rmSimpleStretch, rmFineResample);
ResampleMode indicates only if image is stretched without applying any filter, or by using filter to do a fine resample. The filter is defined by ResampleFilter property.
Hmm... So if i set rmSimpleStretch in .Resample it doesn't apply any filter, only Stretching? And if I set rmFineResample (or let it blank to autoset) it will use ResampleFilter in wich rfLinear is the fastest and simpliest and rfCosine is the slowes and the best?

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #205 on: April 20, 2011, 12:08:31 pm »
Yes, but there is no difference of speed between rfLinear, rfHalfCosine and rfCosine. It depends on what you want. If you want to see the pixels, choose rfCosine, if you want to see no pixel, choose rfLinear. rfHalfCosine is a mix of the two.
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #206 on: April 20, 2011, 09:20:24 pm »
Here is a new version (3.6) with new resample filters : Mitchell and Spline. I added also BestQuality filter which takes Mitchell or Spline depending on the size (Mitchell is better for downsizing and Spline better for upsizing).

I fixed the text bug in the color dialog.

https://sourceforge.net/projects/lazpaint/files/src/
Conscience is the debugger of the mind

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #207 on: April 25, 2011, 11:17:46 pm »
New version (3.7) with :
- pen preview
- faster blur
- enter key for validating polygone and spline
- config file in user directory
- nicer texture rendering and added vertical wood

Available here:
https://sourceforge.net/projects/lazpaint/files/src/
Conscience is the debugger of the mind

fabienwang

  • Sr. Member
  • ****
  • Posts: 449
  • Lazarus is the best
    • My blog
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #208 on: April 26, 2011, 12:24:07 am »
Nice work, i'll make binaries ASAP

Binaries for win32 and linux gtk2 available here:

https://sourceforge.net/projects/lazpaint/files/bin/
« Last Edit: April 26, 2011, 08:58:45 am by FabienWang »
I'm using Arch Linux.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint

circular

  • Hero Member
  • *****
  • Posts: 4195
    • Personal webpage
Re: LazPaint (alpha-blending, antialiasing, filters)
« Reply #209 on: April 26, 2011, 01:34:25 pm »
Thanks.

The Mac version is buggy. I'm working on it in subversion.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018