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
Old 12th October 2011, 11:46   #1  |  Link
Registered User
Join Date: Jan 2006
Posts: 1,862
New Script: mt_line

#mt_line Ver 1.0 by jmac698
#A utility to create relative coordinates of a line for use with Masktools V2

str=mt_line(n,0,true,n/2)#Create a horizontal line ending with (0,0) (left line)

function mt_line(int "hor_radius", int "ver_radius", bool "zero", int "position"){
    #mt_line(int hor_radius(1), int ver_radius(0), bool zero(true), string position(0))
    #Creates a relative coordinates list that can be used in mt_convolution, mt_mappedblur, luts(x), mt_expand and mt_inpand
    #Requires Masktools v2a30+ (mt_freerectangle)
    #zero decides whether the center of the form is included or not. 
    #One of hor_radius or ver_radius must be zero
    #position is the position of (0,0).  Zero indicates that it is centered.
    #Bugs:  zero support is non-functional due to a bug in masktools
    #  returns 0 0 for radius=0, following underlying function
    assert(hor_radius==0 || ver_radius==0,"mt_line:  hor_radius or ver_radius must be zero")
    x2=hor_radius==0?0:-position+hor_radius/2#this is one more than x1 on even radius
    #mt_freerectangle : int top_x(-1), int top_y(-1), int bottom_x(1), int bottom_y(1), bool zero(true)
    mt_freerectangle(x1, y1, x2, y2, zero)#automagically work when masktools is fixed

Last edited by jmac698; 12th October 2011 at 12:15.
jmac698 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 22:06.

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