Вверх ↑
Ответов: 1736
Рейтинг: 152
#1: 2017-07-12 22:46:43 ЛС | профиль | цитата
А вот и новый вариант программы для создания бесшовных текстур из любого рисунка:

Add(ChildScrollBox,12913899,455,525)
{
}
BEGIN_SDK
Add(EditMulti,8785714,21,21)
{
WorkCount=1
Width=349
link(doWork1,6008021:doLoad,[(49,27)(49,97)])
}
Add(ScrollBox,826,322,35)
{
Width=622
Height=451
Align=5
}
Add(Image,6008021,77,91)
{
Color=-16777196
Hint="Нажмите для сохранения"
AutoSize=0
ViewStyle=4
Point(doWidth)
link(onClick,16205854:doExecute,[])
}
Add(SDialog,16205854,133,91)
{
Filter="bmp(*.bmp)|*.bmp|jpg(*.jpg)|*.jpg"
FileName=""
link(onExecute,448738:doSave,[])
}
Add(PictureStream,448738,182,84)
{
Quality=100
link(Bitmap,6008021:ImageBitmap,[(195,72)(139,72)(139,135)(83,135)])
}
END_SDK
Add(DropFile,9710177,70,336)
{
link(onDropFile,10132625:doLoad,[])
}
Add(Img_Loader,10132625,175,336)
{
link(onLoad,3121095:doEvent1,[])
}
Add(JanFX,3448494,406,525)
{
Value1=0
Point(doTexturizeFlip)
Point(Value1)
link(onResult,12913899:doWork1,[])
link(Bitmap,652026:Var3,[(412,481)])
link(Value1,9740366:Var1,[])
}
Add(ChildPanel,9740366,413,336)
{
link(onEvent1,2274624:In,[])
link(onEvent2,10419402:doOperation,[])
link(onEvent3,662988:doOperation,[(517,356)(517,454)])
}
BEGIN_SDK
Add(EditMulti,15471261,21,21)
{
EventCount=3
VarCount=1
link(Var1,14539959:Checked,[(27,141)(34,141)])
}
Add(Panel,4921578,126,84)
{
Width=622
Height=30
Align=2
BorderWidth=0
}
Add(CheckBox,14539959,28,28)
{
Left=5
Top=5
Width=205
Caption="Уменьшать до размеров оригинала"
link(onCheck,15471261:onEvent1,[(190,34)(190,27)])
}
Add(Button,6634262,231,56)
{
Left=220
Top=5
Width=105
Caption="-пиксель справа"
link(onClick,15471261:onEvent2,[(292,62)(292,34)])
}
Add(Button,3616187,231,91)
{
Left=330
Top=5
Width=105
Caption="-пиксель снизу"
link(onClick,15471261:onEvent3,[(292,97)(292,41)])
}
END_SDK
Add(LineBreak,6914966,203,525)
{
Caption="/2"
link(Out,9802696:doWork2,[])
Primary=[2274624,252,-189]
}
Add(Bitmap,16534695,329,336)
{
Point(Width)
Point(Height)
}
Add(Hub,3121095,224,336)
{
link(onEvent1,6636961:doWork2,[])
link(onEvent2,9802696:doWork1,[(249,349)])
}
Add(Img_Copy,3467771,686,343)
{
Point(Width)
Point(Height)
Point(Result)
link(onCopy,16343768:doEvent1,[])
link(Source,16340907:Var,[])
link(Width,10419402:Result,[(713,331)(653,331)(653,387)(594,387)])
link(Height,8823926:Var,[])
}
Add(HubEx,9802696,245,525)
{
link(onEvent,3448494:doTexturizeFlip,[])
}
Add(Math,10419402,588,343)
{
OpType=1
Op2=1
ResultType=0
link(onResult,6403349:doData,[])
link(Op1,657879:Var,[])
}
Add(LineBreak,7297838,336,448)
{
Caption="W"
Type=1
link(Data,2386190:Var2,[])
Primary=[657879,252,-133]
}
Add(GetDataEx,14324293,329,476)
{
link(Data,16534695:Bitmap,[])
}
Add(LineBreak,1473647,329,497)
{
Caption="img"
Type=1
link(Data,14324293:Var2,[])
Primary=[16340907,357,-203]
}
Add(DoData,6403349,637,343)
{
link(onEventData,3467771:doCopy,[])
}
Add(LineBreak,2229778,343,399)
{
Caption="H"
Type=1
link(Data,5191141:Var2,[])
Primary=[8823926,371,-91]
}
Add(HubEx,6636961,308,336)
{
link(onEvent,16534695:doLoad,[])
}
Add(LineBreak,2167145,266,343)
{
link(Out,6636961:doWork3,[(312,349)])
Primary=[15081674,497,0]
}
Add(Hub,16343768,735,343)
{
link(onEvent1,15081674:In,[])
link(onEvent2,15622566:In,[])
}
Add(LineBreak,15790560,203,532)
{
link(Out,10502063:doWork2,[])
Primary=[15622566,560,-182]
}
Add(Img_Copy,3179012,686,448)
{
Point(Width)
Point(Height)
Point(Result)
link(onCopy,9927305:doEvent1,[])
link(Source,2383250:Var,[])
link(Width,9776775:Var,[])
link(Height,662988:Result,[(720,436)(657,436)(657,492)(594,492)])
}
Add(Math,662988,588,448)
{
OpType=1
Op2=1
ResultType=0
link(onResult,807391:doData,[])
link(Op1,11693036:Var,[])
}
Add(LineBreak,11010206,357,392)
{
Caption="H"
Type=1
link(Data,5191141:Var3,[(363,383)])
Primary=[11693036,231,28]
}
Add(LineBreak,6934838,343,497)
{
Caption="img"
Type=1
link(Data,652026:Var2,[])
Primary=[2383250,343,-98]
}
Add(DoData,807391,637,448)
{
link(onEventData,3179012:doCopy,[])
}
Add(LineBreak,11315537,350,441)
{
Caption="W"
Type=1
link(Data,2386190:Var3,[(356,432)])
Primary=[9776775,357,-28]
}
Add(LineBreak,6858181,266,329)
{
link(Out,6636961:doWork1,[(312,335)])
Primary=[8813832,497,119]
}
Add(Hub,9927305,735,448)
{
link(onEvent1,8813832:In,[])
link(onEvent2,8899895:In,[])
}
Add(LineBreak,5925343,203,539)
{
link(Out,10502063:doWork3,[(249,545)])
Primary=[8899895,560,-84]
}
Add(GetDataEx,5191141,343,378)
{
link(Data,16534695:Height,[])
}
Add(GetDataEx,2386190,336,427)
{
link(Data,16534695:Width,[])
}
Add(HubEx,10502063,245,532)
{
Angle=3
link(onEvent,9802696:doWork3,[])
}
Add(GetDataEx,652026,343,476)
{
Angle=3
link(Data,14324293:Var3,[])
}

Здесь уже можно обрезать исходную картинку, делая стыки отражений плавнее. Требуется обновлённый компонент JanFX.
карма: 5
0