Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 22nd July 2015, 23:42   #1  |  Link
Formerly davidh*****
wonkey_monkey's Avatar
Join Date: Jan 2004
Posts: 1,810
"Polygon" - polygon drawing, feedback requested

Download: polygon0.1.zip

This is the very raw beginning of a plugin I'm working on for drawing high quality polygons (mainly with a view to being used as masks) in Avisynth, presented at this early stage mainly as a request for feedback.

It makes use of Windows's GDI+ API, so who knows what problems that might cause


1. Define a polygon with pg_define:

poly=pg_define(x1,y1, x2,y2, x3,y3 ...)

# output is a specially formatted RGB32 clip
# floating point values ARE supported
2. Draw the polygon, passing a blankclip (or other RGB32 clip) to set output clip parameters:

pg_draw(blankclip(100,720,480),poly) # 100 frames, NTSC resolution
Improvements to come:
  • Constructors for specific polygons, e.g. regular, circle/ellipse approximations, etc
  • Support for non-polygon objects, e.g. lines (representing lines with thin polygons doesn't work well in GDI+)
  • Animation/tweening between polygons (not sure how well built-in animate will work with GDI+)
  • Oversampling to overcome deficiencies of GDI+ antialiasing
  • Other drawing modes, if any are especially useful, like overlaying an existing clip (would require colourspace conversions)
  • Output to other colourspaces
  • Translate/rotate/scale existing polygons
  • Smoothing of polygons
  • Built-in blurring

Feedback please!
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 23rd July 2015 at 01:16.
wonkey_monkey is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 14:29.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.