Jump to content

Perforated image in GUI


GreenCan
 Share

Recommended Posts

Hey World,

Considering that the last few days before New Year can be spend doing funny things (sometimes we don't have to be serious, right?) What about this one?

You have seen many examples of transparencies and other GUIholes on this forum.

I wrote a variant (of scripts like LogHole or CandleLight) with another (a bit more complex) objective in mind. You can see the result in following attached examples.

Dont be frightened by the long array table in the code. The array contains the coordinates of the perforated image (because thats what it is in fact).

Creating a perforated image by setting up a pattern in an array is nearly impossible, at least you have to be an artist and spend much time on counting the bits, you don't want to do this I guess...

To resolve this problem I wrote a script that scans a B/W image and that will create the code ready for it.

So the thing is done as fast as pasting the code in your GUI script, changing the position of the image, putting the referencial code on the right location and try it out.

Creating a perforated image takes about 30 secs. Creating the (duotone) image will take you more time of course

So what's the use of this? You to decide. Maybe include an original logo in your apps. That's what I do

Let me know what you think

A GreenCan

PS _WinAPI_GetSystemMetrics(4) is used in one of the examples. That's because the transparency is calculated from left upper corner of the frame. As the title bar is a userset of variable heigth, _WinAPI_GetSystemMetrics(4) gives the current height of the title bar (Height of caption).

Example of a window with perforated image

[autoit]#cs ----------------------------------------------------------------------------

AutoIt Version: 3.2.12.1

Author: GreenCan

Script Function:

Example of a window with perforated image

#ce ----------------------------------------------------------------------------

#include <GuiConstants.au3>

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

#include <EditConstants.au3>

#include <ButtonConstants.au3>

#include <StaticConstants.au3>

#include <Array.au3>

#include <WinAPI.au3>

$H_GUI = GuiCreate("Cowboy drinks coffee", 400, 250)

GuiCtrlCreateLabel("", 0,0,400,150)

GuiCtrlSetBkColor(-1, 0x000000)

GuiCtrlCreateEdit("I hope You like it" & @CRLF, 10, 160, 150, 70)

GuiCtrlCreateLabel("By GreenCan", 160, 135, 160, 15)

GuiCtrlSetBkColor(-1, 0x000000)

GUICtrlSetColor(-1, 0xFFFFFF) ; White

$OKbtn = GUICtrlCreateButton("Ok", 300, 210, 60, 20, $BS_DEFPUSHBUTTON )

; and the perforated Image !!!!

# ==> Start

Local $_Left_pos, $_Top_pos, $_GUI_NAME

$_Left_pos = 160 ; Replace with correct position

$_Top_pos = 40 + _WinAPI_GetSystemMetrics(4) +6 ; Just below the title bar (Must #include <WinAPI.au3> if using this function!!!)

GuiCtrlCreateLabel("", $_Left_pos - 6 , 40 ,106,84)

GuiCtrlSetBkColor(-1, 0xFF0000)

$_GUI_NAME = $H_GUI ; 'The name of your GUI window'

_GuiImageHole($_GUI_NAME, $_Left_pos, $_Top_pos, 100, 78)

# <== End

GUISetState()

$msg = 0

While $msg <> $GUI_EVENT_CLOSE

$msg = GUIGetMsg()

Select

Case $msg = $OKbtn

Exit

Case $msg = -3 ; escape key pressed so quit

Exit

EndSelect

WEnd

GUIDelete ( $H_GUI )

Exit

#comments-start

The lines below will generate the perforated image (bewteen start and end)

Move these lines into your GUI code, usually just before GUISetState()

Don't forget to fill in the correct coordinates for $Left_pos, $Top_pos

and enter the GUI Window Handle in the last line

# ==> Start

Local $_Left_pos, $_Top_pos, $_GUI_NAME

$_Left_pos = 10 ; Replace with correct position

$_Top_pos = _WinAPI_GetSystemMetrics(4) ; Just below the title bar (Must #include <WinAPI.au3> if using this function!!!)

$_GUI_NAME = 'The name of your GUI window'

_GuiImageHole($_GUI_NAME, $_Left_pos, $_Top_pos, 100, 78)

# <== End

#comments-end

#FUNCTION# ==============================================================

Func _GuiImageHole($window_handle, $pos_x, $pos_y,$Image_Width ,$Image_Height)

Local $aClassList, $aM_Mask, $aMask

#Region picture array

Local $PictArray[182]

$PictArray[0] = '8,1,24,1'

$PictArray[1] = '80,1,97,1'

$PictArray[2] = '7,2,23,2'

$PictArray[3] = '78,2,97,2'

$PictArray[4] = '7,3,23,3'

$PictArray[5] = '77,3,97,3'

$PictArray[6] = '6,4,22,4'

$PictArray[7] = '75,4,97,4'

$PictArray[8] = '6,5,20,5'

$PictArray[9] = '74,5,97,5'

$PictArray[10] = '5,6,19,6'

$PictArray[11] = '72,6,97,6'

$PictArray[12] = '5,7,18,7'

$PictArray[13] = '71,7,97,7'

$PictArray[14] = '5,8,17,8'

$PictArray[15] = '69,8,97,8'

$PictArray[16] = '5,9,17,9'

$PictArray[17] = '69,9,97,9'

$PictArray[18] = '5,10,17,10'

$PictArray[19] = '69,10,91,10'

$PictArray[20] = '5,11,18,11'

$PictArray[21] = '70,11,90,11'

$PictArray[22] = '5,12,18,12'

$PictArray[23] = '70,12,89,12'

$PictArray[24] = '5,13,19,13'

$PictArray[25] = '70,13,89,13'

$PictArray[26] = '5,14,19,14'

$PictArray[27] = '70,14,88,14'

$PictArray[28] = '94,14,97,14'

$PictArray[29] = '5,15,20,15'

$PictArray[30] = '71,15,88,15'

$PictArray[31] = '93,15,97,15'

$PictArray[32] = '5,16,20,16'

$PictArray[33] = '71,16,89,16'

$PictArray[34] = '94,16,97,16'

$PictArray[35] = '5,17,21,17'

$PictArray[36] = '71,17,89,17'

$PictArray[37] = '96,17,97,17'

$PictArray[38] = '5,18,22,18'

$PictArray[39] = '71,18,90,18'

$PictArray[40] = '97,18,97,18'

$PictArray[41] = '5,19,22,19'

$PictArray[42] = '71,19,91,19'

$PictArray[43] = '5,20,22,20'

$PictArray[44] = '71,20,92,20'

$PictArray[45] = '5,21,22,21'

$PictArray[46] = '71,21,93,21'

$PictArray[47] = '5,22,21,22'

$PictArray[48] = '71,22,93,22'

$PictArray[49] = '5,23,21,23'

$PictArray[50] = '71,23,92,23'

$PictArray[51] = '5,24,20,24'

$PictArray[52] = '70,24,90,24'

$PictArray[53] = '5,25,20,25'

$PictArray[54] = '71,25,89,25'

$PictArray[55] = '97,25,97,25'

$PictArray[56] = '5,26,20,26'

$PictArray[57] = '71,26,88,26'

$PictArray[58] = '95,26,97,26'

$PictArray[59] = '5,27,19,27'

$PictArray[60] = '71,27,87,27'

$PictArray[61] = '92,27,97,27'

$PictArray[62] = '5,28,19,28'

$PictArray[63] = '72,28,86,28'

$PictArray[64] = '91,28,97,28'

$PictArray[65] = '5,29,18,29'

$PictArray[66] = '72,29,87,29'

$PictArray[67] = '94,29,97,29'

$PictArray[68] = '5,30,18,30'

$PictArray[69] = '73,30,87,30'

$PictArray[70] = '95,30,97,30'

$PictArray[71] = '5,31,18,31'

$PictArray[72] = '24,31,25,31'

$PictArray[73] = '73,31,89,31'

$PictArray[74] = '96,31,97,31'

$PictArray[75] = '5,32,17,32'

$PictArray[76] = '23,32,26,32'

$PictArray[77] = '74,32,91,32'

$PictArray[78] = '96,32,97,32'

$PictArray[79] = '5,33,16,33'

$PictArray[80] = '22,33,26,33'

$PictArray[81] = '74,33,90,33'

$PictArray[82] = '96,33,97,33'

$PictArray[83] = '5,34,16,34'

$PictArray[84] = '20,34,26,34'

$PictArray[85] = '74,34,89,34'

$PictArray[86] = '96,34,97,34'

$PictArray[87] = '5,35,22,35'

$PictArray[88] = '74,35,87,35'

$PictArray[89] = '95,35,97,35'

$PictArray[90] = '5,36,18,36'

$PictArray[91] = '20,36,21,36'

$PictArray[92] = '69,36,85,36'

$PictArray[93] = '94,36,97,36'

$PictArray[94] = '6,37,17,37'

$PictArray[95] = '70,37,82,37'

$PictArray[96] = '93,37,97,37'

$PictArray[97] = '6,38,17,38'

$PictArray[98] = '69,38,80,38'

$PictArray[99] = '92,38,97,38'

$PictArray[100] = '6,39,16,39'

$PictArray[101] = '69,39,78,39'

$PictArray[102] = '90,39,97,39'

$PictArray[103] = '6,40,16,40'

$PictArray[104] = '70,40,77,40'

$PictArray[105] = '88,40,97,40'

$PictArray[106] = '6,41,16,41'

$PictArray[107] = '70,41,77,41'

$PictArray[108] = '86,41,97,41'

$PictArray[109] = '7,42,14,42'

$PictArray[110] = '69,42,76,42'

$PictArray[111] = '83,42,97,42'

$PictArray[112] = '7,43,13,43'

$PictArray[113] = '68,43,76,43'

$PictArray[114] = '81,43,97,43'

$PictArray[115] = '7,44,12,44'

$PictArray[116] = '68,44,76,44'

$PictArray[117] = '81,44,97,44'

$PictArray[118] = '8,45,11,45'

$PictArray[119] = '67,45,76,45'

$PictArray[120] = '81,45,97,45'

$PictArray[121] = '8,46,11,46'

$PictArray[122] = '66,46,76,46'

$PictArray[123] = '81,46,83,46'

$PictArray[124] = '88,46,97,46'

$PictArray[125] = '9,47,11,47'

$PictArray[126] = '66,47,77,47'

$PictArray[127] = '89,47,97,47'

$PictArray[128] = '9,48,11,48'

$PictArray[129] = '66,48,74,48'

$PictArray[130] = '89,48,97,48'

$PictArray[131] = '10,49,10,49'

$PictArray[132] = '66,49,72,49'

$PictArray[133] = '89,49,97,49'

$PictArray[134] = '66,50,70,50'

$PictArray[135] = '90,50,97,50'

$PictArray[136] = '52,51,52,51'

$PictArray[137] = '65,51,70,51'

$PictArray[138] = '90,51,97,51'

$PictArray[139] = '52,52,56,52'

$PictArray[140] = '58,52,58,52'

$PictArray[141] = '64,52,70,52'

$PictArray[142] = '90,52,97,52'

$PictArray[143] = '53,53,70,53'

$PictArray[144] = '91,53,96,53'

$PictArray[145] = '54,54,69,54'

$PictArray[146] = '90,54,95,54'

$PictArray[147] = '55,55,68,55'

$PictArray[148] = '91,55,94,55'

$PictArray[149] = '55,56,65,56'

$PictArray[150] = '87,56,87,56'

$PictArray[151] = '90,56,94,56'

$PictArray[152] = '55,57,62,57'

$PictArray[153] = '85,57,85,57'

$PictArray[154] = '90,57,93,57'

$PictArray[155] = '55,58,59,58'

$PictArray[156] = '90,58,92,58'

$PictArray[157] = '55,59,58,59'

$PictArray[158] = '89,59,90,59'

$PictArray[159] = '55,60,58,60'

$PictArray[160] = '74,60,75,60'

$PictArray[161] = '89,60,89,60'

$PictArray[162] = '56,61,58,61'

$PictArray[163] = '74,61,75,61'

$PictArray[164] = '87,61,89,61'

$PictArray[165] = '56,62,57,62'

$PictArray[166] = '75,62,75,62'

$PictArray[167] = '84,62,88,62'

$PictArray[168] = '56,63,57,63'

$PictArray[169] = '75,63,76,63'

$PictArray[170] = '81,63,87,63'

$PictArray[171] = '56,64,57,64'

$PictArray[172] = '76,64,85,64'

$PictArray[173] = '56,65,57,65'

$PictArray[174] = '76,65,84,65'

$PictArray[175] = '55,66,56,66'

$PictArray[176] = '76,66,83,66'

$PictArray[177] = '56,67,56,67'

$PictArray[178] = '76,67,81,67'

$PictArray[179] = '77,68,79,68'

$PictArray[180] = '77,69,79,69'

$PictArray[181] = '77,70,77,70'

#EndRegion picture array

; get the size of the active window

$size = WinGetClientSize($window_handle)

$Window_width = $size[0]

$Window_height = $size[1] + 40 ; include height of title bar up to 30 dots

; First hide the window

$aClassList = StringSplit(_WinGetClassListEx($window_handle), @LF)

$aM_Mask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', 0, 'long', 0)

; rectangle A - left side

$aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $pos_x, 'long', $Window_height)

DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)

; rectangle B - Top

$aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $Window_width, 'long', $pos_y)

DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)

; rectangle C - Right side

$aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Image_Width , 'long', 0 , 'long', $Window_width + 30, 'long', $Window_height)

DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)

; rectangle D - Bottom

$aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0 , 'long', $pos_y + $Image_Height, 'long', $Window_width, 'long', $Window_height)

DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)

; now unhide all regions as defined in array $PictArray

For $i = 0 To (UBound($PictArray) - 1)

$Block_value = StringSplit($PictArray[$i],',')

$aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Block_value[1] - 1 , 'long', $pos_y + $Block_value[2], 'long', $pos_x + $Block_value[3], 'long', $pos_y + $Block_value[4] -1)

DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)

Next

DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $window_handle, 'long', $aM_Mask[0], 'int', 1)

$PictArray='' ; empty array

EndFunc ;==>_GuiImageHole

#FUNCTION# ==============================================================

Func _WinGetClassListEx($sTitle)

Local $sClassList = WinGetClassList($sTitle)

Local $aClassList = StringSplit($sClassList, @LF)

Local $sRetClassList = '', $sHold_List = '|'

Local $aiInHold, $iInHold

For $i = 1 To UBound($aClassList) - 1

If $aClassList[$i] = '' Then ContinueLoop

If StringRegExp($sHold_List, '\|' & $aClassList[$i] & '~(\d+)\|') Then

$aiInHold = StringRegExp($sHold_List, '.*\|' & $aClassList[$i] & '~(\d+)\|.*', 1)

$iInHold = Number($aiInHold[uBound($aiInHold)-1])

If $iInHold = 0 Then $iInHold += 1

$aClassList[$i] &= '~' & $iInHold + 1

$sHold_List &= $aClassList[$i] & '|'

$sRetClassList &= $aClassList[$i] & @LF

Else

$aClassList[$i] &= '~1'

$sHold_List &= $aClassList[$i] & '|'

$sRetClassList &= $aClassList[$i] & @LF

EndIf

Next

Return StringReplace(StringStripWS($sRetClassList, 3), '~', '')

EndFunc ;==>_WinGetClassListEx

#FUNCTION# ==============================================================

post-42917-1230684872_thumb.jpg

Edited by GreenCan

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Very nice GreenCan.

The part that interests me most is how you generated the coordinates automatically. Can you show us?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Very nice GreenCan.

The part that interests me most is how you generated the coordinates automatically. Can you show us?

@martin

Thanks, and of course. I included the code in my original post

BTW. Look also in following post:

http://www.autoitscript.com/forum/index.ph...olbar&st=93 latest code

and

http://www.autoitscript.com/forum/index.ph...olbar&st=93 for the explanation

This ToolbarAG.au3 script has an example of a perforated image in the config edit button screen. The image consumes no memory at all once it was created.

Enjoy it,

GreenCan

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

Cool, I really think you got something here!

See how far you can take it!!

8)

Thanks Valuater

Here is another example (the ghost in the authentication bitmap, that's me, more or less) in a logon window

post-42917-1230714841_thumb.jpg

Example_1_GUI_Perforated_Image_in_Logon_window.au3

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

Hi,

Is there a script to make the $PictArray? I would like to know how to make an image into the array code?

Thanks!

edit: Sorry, I see it now in the ToolbarAG.au3 code... Thanks!

@gseller,

The second script 'Scan_BW_Image.au3' produces the array code

Happy New-Year!

GreenCan

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

Thanks for posting your method of scanning GreenCan. It doesn't do what I expected but I should have looked more closely at what your example contained.

It would be interesting (to me at least) to produce a line drawing from the scan. I think it could be done this way.

You have a set of rectangles (well lines really) each one is like this

$PictArray[21] = '70,11,90,11'

This gives 2 coordinates which lie on the outline

70,11

90,11

so you can convert the array into another array with 3 columns and twice the number of rows. The columns can be Xcoord, Ycoord and drawn.

Then start at any coordinate which will be the start of the line and mark it as drawn. Find the nearest undrawn coordinate. (There will be 2 equally near the first time but choose whichever) draw a line to that point mark it as drawn and so on until all points have been drawn. This would allow you to construct the outline even when it folds back on itself.

Instead of drawing you could of course build a new array of all the coordinates in order. It would also allow you to produce the line if the scans were actually spaced apart rather than adjacent pixels.

Then you could scan an object or a drawing and save it as an outline to draw or, if you're this way inclined, control a machine to cut it out of something.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Thanks for posting your method of scanning GreenCan. It doesn't do what I expected but I should have looked more closely at what your example contained.

It would be interesting (to me at least) to produce a line drawing from the scan. I think it could be done this way.

You have a set of rectangles (well lines really) each one is like this

$PictArray[21] = '70,11,90,11'

This gives 2 coordinates which lie on the outline

70,11

90,11

so you can convert the array into another array with 3 columns and twice the number of rows. The columns can be Xcoord, Ycoord and drawn.

Then start at any coordinate which will be the start of the line and mark it as drawn. Find the nearest undrawn coordinate. (There will be 2 equally near the first time but choose whichever) draw a line to that point mark it as drawn and so on until all points have been drawn. This would allow you to construct the outline even when it folds back on itself.

Instead of drawing you could of course build a new array of all the coordinates in order. It would also allow you to produce the line if the scans were actually spaced apart rather than adjacent pixels.

Then you could scan an object or a drawing and save it as an outline to draw or, if you're this way inclined, control a machine to cut it out of something.

Hi Martin,

If I understand you well, you're looking at something close to vector based drawing (except for the resizing then ) to produce wireframe effects.

Indeed, the method that I used is bitmap line based (Top to bottom, LH to RH) scanning.

Your method would produce less array lines for simple drawings I guess but I don't get the reason why you want to do this.

It would also be an extremely difficult scan method. Let me try to explain.

I made following samples for easy understading

sphere.jpg is a white circle on black background in a bitmap sizing 376 x 358 pixels

My scan method produces an array of 530 elements

The result can be seen in following GUIs:

Example Sphere Perforated image!.au3 (black pixels erased)

and

Example Sphere Perforated image! negative effect.au3 (white pixels erased)

I also attach the file drawing.txt which contains the same pattern as the sphere image but in a textfile (One space for a black dot and one '*' for a white dot)

If you have an editor that can show column and row number, you can follow what I write hereunder.

The circle starts at 171,45, the first continuous line goes RH to 202,45

Next, the scan will have to identify in which direction goes the next piece of line, that means that the 7 adjacent pixels around pos 202,45 should be checked for the white colour.

Then the scan will have to follow the dot patern untill it interupts (in any of the 7 directions)

Problem 1: What if there are no white dots around pos 202,45? (Could be that the image is not perfect) How does the scanner continue it's job if the white dots are not continuous?

Problem 2: Starting at position 278,76 the next continuous line goes in diagonal down to the right until pos 286,94

The patern goes a bit like this

*

**

*

**

*

** etc

How can the scanner see that there is another white dot on the right side of the line, except if it scans every dot again adjasent to the current position.

Imagine the current sphere bitmap image, my method scans a maximum of 134984 pixels, but the new method would have to scan up to 1079872 pixels.

Problem 3 what about isolated dots? There is one in pos 218,52.

I tried to make an example using your method (manually) but I stopped after 37 elements (about 20 degrees of the circle). It made me crazy after half an hour of work :)

Example Sphere wireframe Perforated image!.au3

Then next question is, what kind of images would you scan exactly?

A circle is a pretty simple patern to follow but what about this example:

Example 2 GUI Perforated image!.au3

I wouldn't know how to scan this.

Cheers, GreenCan

post-42917-1230839785_thumb.jpg

Example_Sphere_Perforated_image__negative_effect.au3

Example_Sphere_Perforated_image_.au3

Example_Sphere_wireframe_Perforated_image_.au3

Aztec_Perforated_image_.au3

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

Hi Martin,

If I understand you well, you're looking at something close to vector based drawing (except for the resizing then ) to produce wireframe effects.

Indeed, the method that I used is bitmap line based (Top to bottom, LH to RH) scanning.

Your method would produce less array lines for simple drawings I guess but I don't get the reason why you want to do this.

It would also be an extremely difficult scan method. Let me try to explain.

I made following samples for easy understading

sphere.jpg is a white circle on black background in a bitmap sizing 376 x 358 pixels

My scan method produces an array of 530 elements

The result can be seen in following GUIs:

Example Sphere Perforated image!.au3 (black pixels erased)

and

Example Sphere Perforated image! negative effect.au3 (white pixels erased)

I also attach the file drawing.txt which contains the same pattern as the sphere image but in a textfile (One space for a black dot and one '*' for a white dot)

If you have an editor that can show column and row number, you can follow what I write hereunder.

The circle starts at 171,45, the first continuous line goes RH to 202,45

Next, the scan will have to identify in which direction goes the next piece of line, that means that the 7 adjacent pixels around pos 202,45 should be checked for the white colour.

Then the scan will have to follow the dot patern untill it interupts (in any of the 7 directions)

Problem 1: What if there are no white dots around pos 202,45? (Could be that the image is not perfect) How does the scanner continue it's job if the white dots are not continuous?

Problem 2: Starting at position 278,76 the next continuous line goes in diagonal down to the right until pos 286,94

The patern goes a bit like this

*

**

*

**

*

** etc

How can the scanner see that there is another white dot on the right side of the line, except if it scans every dot again adjasent to the current position.

Imagine the current sphere bitmap image, my method scans a maximum of 134984 pixels, but the new method would have to scan up to 1079872 pixels.

Problem 3 what about isolated dots? There is one in pos 218,52.

I tried to make an example using your method (manually) but I stopped after 37 elements (about 20 degrees of the circle). It made me crazy after half an hour of work :)

Example Sphere wireframe Perforated image!.au3

Then next question is, what kind of images would you scan exactly?

A circle is a pretty simple patern to follow but what about this example:

Example 2 GUI Perforated image!.au3

I wouldn't know how to scan this.

Cheers, GreenCan

I've made a script which produces a line drawing of the outlines but it needs a bit of work yet. In doing it I discovered a small error in you algorithm.

when you have lines like this

_ArrayAdd($PictArray, String($first_pixel + 1) & "," & String($aY) & "," & String($aX) & "," & String($aY) )

Then they should be

_ArrayAdd($PictArray, String($first_pixel) & "," & String($aY) & "," & String($aX-1) & "," & String($aY) )

Without the corrections there is a small distortion in the copy you make. I discovered this because if I make a line drawing and there is a section which is horizontal I only get points for the ends of the section. When I am constructing the line I have no easy way to know that the next point to draw to is the one a long way away but at the end of a straight line which marks an edge. So I am scanning once horizontally and once vertically to get a lot more points, and then removing duplicates. I ended up with two lines in some sections which was due to the error.

My code needs a bit of work as you can see from the results of some tests so far, but I'm getting close.

These are line drawings made with GUICtrlSetGraphic($graphic, $GUI_GR_LINE, $x, $y)

post-3602-1230935477_thumb.png post-3602-1230935490_thumb.png post-3602-1230935500_thumb.png

The GreenCan one for example, once I get it right, would allow you to cut the letters out of vinyl with a knife or almost any material with a water-jet cutter, or cut the letters in a piece of wood with a router. Also, by having a line drawing you can smooth the lines so that when it is scaled up it looks ok.

By creating a design for a special window shape and applying your method in reverse you can create the special shaped window without having to figure out all the points yourself. You can also specify an enclosed shape with a series of x,y points and since some will be on a straight line the number of points can be reduced.

Many designs are made to look right without any care about the exact geometry. Old mirrors are an example. If someone wants a copy of a special mirror then you need some way to copy it and this method could be used. The line drawing can pass the path for the glass cutter to the cutting machine. I once wanted a sheet metal cover replaced on a machine but I didn't have the original design. The sheet metal company I deal with put the cover in a scanner (the cover was about 800mm x 700mm) and then they stamped out a copy. Admittedly the scanner cost about $700,000 but I wondered how to do that.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Hi Martin,

This is amazing. Brilliant! Let me know when your script is completed. I am really interested in understanding how you did it.

I am happy that my code inspired you to do something different with it.

Thank you for pointing me the bug. I found a few others that I corrected meanwhile. The latest scanner script is in my first post.

Minor:

- The position of the image was not centered on the screen. Fixed

Major:

- The height of the Title bar can vary according to the desktop settings. Therefore the scan could be eroneous.

- The image could be moved while scanning, causing a bad scanned image

I fixed both by changing the window to a popup with border. I also adapted the scan coordinates.

Litlle enhancements:

- I show the image before the selection message.

- Possibility to create a text file representing the scanned image ($create_txtfile)

Remark:

Please note that the flexible colors as per below lines can cause a strange effect if the image is not a perfect B/W image. For example making objects ticker or smaller.

If ($Erase_White = True And $Pixel_color > 16610000) Or ($Erase_White = False And $Pixel_color < 100000) Then ; almost white

;~ If $Pixel_color < 100000 Then ; almost black use this if you want to remove the opposite color

GreenCan

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

Hi Martin,

Let me know when your script is completed. I am really interested in understanding how you did it.

GreenCan

I'm still trying to make it look sensinsible. When I've done that I'll post it with an explanation.

Meanwhile here is an example of a result to show that I've made some progress The drawing is slowed down so you can see what's happening.

It isn't difficult though it takes a long time to work out all the different sections and put them into order. My script took over a minute to work out the new array for this example.

EDIT:One of the things I want to do is to simplify the array so that straight lines are only represented by the start and end points instead of every point along the line.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

@martin

I like it very much. 4 stars from me too.

@firefox

Thanks

Cheers,

GreenCan

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.12.1
 Author:         GreenCan

 Script Function:
    Create a window with my perforated image

#ce ----------------------------------------------------------------------------
#include <GuiConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <Array.au3>
#include <WinAPI.au3>

$H_GUI = GuiCreate("Thumbs Up", 205, 280)

$OKbtn = GUICtrlCreateButton("Ok", 80, 260, 50, 20, $BS_DEFPUSHBUTTON)
GUISetState()
GuiCtrlCreateLabel("", 0,0,210,260)
GuiCtrlSetBkColor(-1, 0xff0000)



# ==> Start
Local $_Left_pos, $_Top_pos, $_GUI_NAME
$_Left_pos = 3 ; Replace with correct position
$_Top_pos = _WinAPI_GetSystemMetrics(4) +2 ; Just below the title bar (Must #include <WinAPI.au3>
$_GUI_NAME = $H_GUI
_GuiImageHole($_GUI_NAME, $_Left_pos, $_Top_pos, 200, 259)
# <== End


GUISetState()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
    $msg = GUIGetMsg()
    Select
        Case $msg = $OKbtn
            Exit
        Case $msg = -3 ; escape key pressed so quit
            Exit                
    EndSelect
WEnd

GUIDelete ( $H_GUI )
Exit


#Region Perforated Image
#comments-start
    The lines below will generate the perforated image (bewteen start and end)
    Move these lines into your GUI code, usually just before GUISetState()
    Don't forget to fill in the correct coordinates for $Left_pos, $Top_pos
    and enter the GUI Window Handle in the last line

# ==> Start
Local $_Left_pos, $_Top_pos, $_GUI_NAME
$_Left_pos = 10 ; Replace with correct position
$_Top_pos =  _WinAPI_GetSystemMetrics(4) ; Just below the title bar (Must #include <WinAPI.au3> if using this function!!!)
$_GUI_NAME = 'The name of your GUI window'
_GuiImageHole($_GUI_NAME, $_Left_pos, $_Top_pos, 200, 259)
# <== End

#comments-end

#FUNCTION# ==============================================================
Func _GuiImageHole($window_handle, $pos_x, $pos_y,$Image_Width ,$Image_Height)
    Local $aClassList, $aM_Mask, $aMask
#Region picture array
Local $PictArray[816]
$PictArray[0] = '1,1,201,1'
$PictArray[1] = '1,2,201,2'
$PictArray[2] = '1,3,201,3'
$PictArray[3] = '1,4,201,4'
$PictArray[4] = '1,5,201,5'
$PictArray[5] = '1,6,201,6'
$PictArray[6] = '1,7,121,7'
$PictArray[7] = '125,7,201,7'
$PictArray[8] = '1,8,121,8'
$PictArray[9] = '128,8,201,8'
$PictArray[10] = '1,9,120,9'
$PictArray[11] = '132,9,201,9'
$PictArray[12] = '1,10,121,10'
$PictArray[13] = '135,10,201,10'
$PictArray[14] = '1,11,120,11'
$PictArray[15] = '137,11,201,11'
$PictArray[16] = '1,12,120,12'
$PictArray[17] = '139,12,201,12'
$PictArray[18] = '1,13,120,13'
$PictArray[19] = '141,13,201,13'
$PictArray[20] = '1,14,120,14'
$PictArray[21] = '142,14,201,14'
$PictArray[22] = '1,15,119,15'
$PictArray[23] = '144,15,201,15'
$PictArray[24] = '1,16,119,16'
$PictArray[25] = '145,16,201,16'
$PictArray[26] = '1,17,119,17'
$PictArray[27] = '146,17,201,17'
$PictArray[28] = '1,18,119,18'
$PictArray[29] = '147,18,201,18'
$PictArray[30] = '1,19,118,19'
$PictArray[31] = '148,19,201,19'
$PictArray[32] = '1,20,118,20'
$PictArray[33] = '128,20,129,20'
$PictArray[34] = '149,20,201,20'
$PictArray[35] = '1,21,118,21'
$PictArray[36] = '128,21,132,21'
$PictArray[37] = '150,21,201,21'
$PictArray[38] = '1,22,117,22'
$PictArray[39] = '128,22,134,22'
$PictArray[40] = '150,22,201,22'
$PictArray[41] = '1,23,117,23'
$PictArray[42] = '128,23,135,23'
$PictArray[43] = '151,23,201,23'
$PictArray[44] = '1,24,117,24'
$PictArray[45] = '127,24,137,24'
$PictArray[46] = '152,24,201,24'
$PictArray[47] = '1,25,117,25'
$PictArray[48] = '127,25,138,25'
$PictArray[49] = '152,25,201,25'
$PictArray[50] = '1,26,117,26'
$PictArray[51] = '127,26,139,26'
$PictArray[52] = '153,26,201,26'
$PictArray[53] = '1,27,117,27'
$PictArray[54] = '127,27,140,27'
$PictArray[55] = '153,27,201,27'
$PictArray[56] = '1,28,116,28'
$PictArray[57] = '126,28,141,28'
$PictArray[58] = '154,28,201,28'
$PictArray[59] = '1,29,116,29'
$PictArray[60] = '126,29,142,29'
$PictArray[61] = '154,29,201,29'
$PictArray[62] = '1,30,116,30'
$PictArray[63] = '126,30,142,30'
$PictArray[64] = '154,30,201,30'
$PictArray[65] = '1,31,116,31'
$PictArray[66] = '126,31,143,31'
$PictArray[67] = '154,31,201,31'
$PictArray[68] = '1,32,115,32'
$PictArray[69] = '126,32,143,32'
$PictArray[70] = '154,32,201,32'
$PictArray[71] = '1,33,115,33'
$PictArray[72] = '126,33,143,33'
$PictArray[73] = '155,33,201,33'
$PictArray[74] = '1,34,115,34'
$PictArray[75] = '125,34,144,34'
$PictArray[76] = '155,34,201,34'
$PictArray[77] = '1,35,115,35'
$PictArray[78] = '125,35,144,35'
$PictArray[79] = '155,35,201,35'
$PictArray[80] = '1,36,114,36'
$PictArray[81] = '125,36,144,36'
$PictArray[82] = '155,36,201,36'
$PictArray[83] = '1,37,114,37'
$PictArray[84] = '125,37,145,37'
$PictArray[85] = '155,37,201,37'
$PictArray[86] = '1,38,114,38'
$PictArray[87] = '124,38,145,38'
$PictArray[88] = '155,38,201,38'
$PictArray[89] = '1,39,114,39'
$PictArray[90] = '124,39,145,39'
$PictArray[91] = '155,39,201,39'
$PictArray[92] = '1,40,114,40'
$PictArray[93] = '124,40,145,40'
$PictArray[94] = '155,40,201,40'
$PictArray[95] = '1,41,114,41'
$PictArray[96] = '124,41,145,41'
$PictArray[97] = '156,41,201,41'
$PictArray[98] = '1,42,113,42'
$PictArray[99] = '123,42,145,42'
$PictArray[100] = '156,42,201,42'
$PictArray[101] = '1,43,113,43'
$PictArray[102] = '123,43,145,43'
$PictArray[103] = '155,43,201,43'
$PictArray[104] = '1,44,113,44'
$PictArray[105] = '123,44,145,44'
$PictArray[106] = '155,44,201,44'
$PictArray[107] = '1,45,112,45'
$PictArray[108] = '123,45,145,45'
$PictArray[109] = '155,45,201,45'
$PictArray[110] = '1,46,112,46'
$PictArray[111] = '122,46,145,46'
$PictArray[112] = '155,46,201,46'
$PictArray[113] = '1,47,112,47'
$PictArray[114] = '123,47,144,47'
$PictArray[115] = '155,47,201,47'
$PictArray[116] = '1,48,111,48'
$PictArray[117] = '122,48,144,48'
$PictArray[118] = '155,48,201,48'
$PictArray[119] = '1,49,110,49'
$PictArray[120] = '122,49,144,49'
$PictArray[121] = '154,49,201,49'
$PictArray[122] = '1,50,109,50'
$PictArray[123] = '122,50,144,50'
$PictArray[124] = '154,50,201,50'
$PictArray[125] = '1,51,108,51'
$PictArray[126] = '122,51,143,51'
$PictArray[127] = '154,51,201,51'
$PictArray[128] = '1,52,107,52'
$PictArray[129] = '121,52,143,52'
$PictArray[130] = '154,52,201,52'
$PictArray[131] = '1,53,106,53'
$PictArray[132] = '120,53,143,53'
$PictArray[133] = '154,53,201,53'
$PictArray[134] = '1,54,105,54'
$PictArray[135] = '119,54,142,54'
$PictArray[136] = '153,54,201,54'
$PictArray[137] = '1,55,104,55'
$PictArray[138] = '119,55,142,55'
$PictArray[139] = '153,55,201,55'
$PictArray[140] = '1,56,103,56'
$PictArray[141] = '118,56,141,56'
$PictArray[142] = '152,56,201,56'
$PictArray[143] = '1,57,102,57'
$PictArray[144] = '117,57,141,57'
$PictArray[145] = '152,57,201,57'
$PictArray[146] = '1,58,102,58'
$PictArray[147] = '116,58,140,58'
$PictArray[148] = '152,58,201,58'
$PictArray[149] = '1,59,100,59'
$PictArray[150] = '115,59,140,59'
$PictArray[151] = '151,59,201,59'
$PictArray[152] = '1,60,99,60'
$PictArray[153] = '114,60,139,60'
$PictArray[154] = '151,60,201,60'
$PictArray[155] = '1,61,99,61'
$PictArray[156] = '113,61,139,61'
$PictArray[157] = '150,61,201,61'
$PictArray[158] = '1,62,97,62'
$PictArray[159] = '112,62,138,62'
$PictArray[160] = '150,62,201,62'
$PictArray[161] = '1,63,97,63'
$PictArray[162] = '111,63,137,63'
$PictArray[163] = '149,63,201,63'
$PictArray[164] = '1,64,96,64'
$PictArray[165] = '110,64,137,64'
$PictArray[166] = '149,64,201,64'
$PictArray[167] = '1,65,95,65'
$PictArray[168] = '109,65,136,65'
$PictArray[169] = '149,65,201,65'
$PictArray[170] = '1,66,94,66'
$PictArray[171] = '108,66,136,66'
$PictArray[172] = '148,66,201,66'
$PictArray[173] = '1,67,93,67'
$PictArray[174] = '107,67,135,67'
$PictArray[175] = '148,67,201,67'
$PictArray[176] = '1,68,92,68'
$PictArray[177] = '106,68,134,68'
$PictArray[178] = '147,68,201,68'
$PictArray[179] = '1,69,91,69'
$PictArray[180] = '106,69,134,69'
$PictArray[181] = '147,69,201,69'
$PictArray[182] = '1,70,90,70'
$PictArray[183] = '105,70,133,70'
$PictArray[184] = '146,70,201,70'
$PictArray[185] = '1,71,89,71'
$PictArray[186] = '104,71,133,71'
$PictArray[187] = '145,71,201,71'
$PictArray[188] = '1,72,88,72'
$PictArray[189] = '103,72,132,72'
$PictArray[190] = '145,72,201,72'
$PictArray[191] = '1,73,87,73'
$PictArray[192] = '102,73,132,73'
$PictArray[193] = '144,73,201,73'
$PictArray[194] = '1,74,86,74'
$PictArray[195] = '101,74,131,74'
$PictArray[196] = '144,74,201,74'
$PictArray[197] = '1,75,85,75'
$PictArray[198] = '100,75,131,75'
$PictArray[199] = '143,75,201,75'
$PictArray[200] = '1,76,84,76'
$PictArray[201] = '99,76,130,76'
$PictArray[202] = '143,76,201,76'
$PictArray[203] = '1,77,83,77'
$PictArray[204] = '98,77,130,77'
$PictArray[205] = '142,77,201,77'
$PictArray[206] = '1,78,83,78'
$PictArray[207] = '97,78,130,78'
$PictArray[208] = '142,78,201,78'
$PictArray[209] = '1,79,82,79'
$PictArray[210] = '96,79,129,79'
$PictArray[211] = '141,79,201,79'
$PictArray[212] = '1,80,81,80'
$PictArray[213] = '95,80,129,80'
$PictArray[214] = '141,80,201,80'
$PictArray[215] = '1,81,80,81'
$PictArray[216] = '94,81,128,81'
$PictArray[217] = '140,81,201,81'
$PictArray[218] = '1,82,79,82'
$PictArray[219] = '93,82,128,82'
$PictArray[220] = '140,82,201,82'
$PictArray[221] = '1,83,78,83'
$PictArray[222] = '92,83,127,83'
$PictArray[223] = '140,83,201,83'
$PictArray[224] = '1,84,77,84'
$PictArray[225] = '91,84,127,84'
$PictArray[226] = '139,84,201,84'
$PictArray[227] = '1,85,77,85'
$PictArray[228] = '90,85,127,85'
$PictArray[229] = '139,85,201,85'
$PictArray[230] = '1,86,76,86'
$PictArray[231] = '89,86,127,86'
$PictArray[232] = '138,86,201,86'
$PictArray[233] = '1,87,75,87'
$PictArray[234] = '88,87,126,87'
$PictArray[235] = '138,87,201,87'
$PictArray[236] = '1,88,74,88'
$PictArray[237] = '87,88,126,88'
$PictArray[238] = '138,88,201,88'
$PictArray[239] = '1,89,73,89'
$PictArray[240] = '86,89,126,89'
$PictArray[241] = '137,89,201,89'
$PictArray[242] = '1,90,72,90'
$PictArray[243] = '86,90,125,90'
$PictArray[244] = '137,90,201,90'
$PictArray[245] = '1,91,72,91'
$PictArray[246] = '85,91,125,91'
$PictArray[247] = '137,91,201,91'
$PictArray[248] = '1,92,71,92'
$PictArray[249] = '84,92,125,92'
$PictArray[250] = '136,92,201,92'
$PictArray[251] = '1,93,70,93'
$PictArray[252] = '83,93,124,93'
$PictArray[253] = '136,93,201,93'
$PictArray[254] = '1,94,70,94'
$PictArray[255] = '82,94,124,94'
$PictArray[256] = '136,94,201,94'
$PictArray[257] = '1,95,69,95'
$PictArray[258] = '82,95,124,95'
$PictArray[259] = '136,95,201,95'
$PictArray[260] = '1,96,68,96'
$PictArray[261] = '81,96,124,96'
$PictArray[262] = '135,96,201,96'
$PictArray[263] = '1,97,67,97'
$PictArray[264] = '80,97,124,97'
$PictArray[265] = '135,97,201,97'
$PictArray[266] = '1,98,67,98'
$PictArray[267] = '79,98,124,98'
$PictArray[268] = '135,98,201,98'
$PictArray[269] = '1,99,66,99'
$PictArray[270] = '79,99,124,99'
$PictArray[271] = '135,99,201,99'
$PictArray[272] = '1,100,65,100'
$PictArray[273] = '78,100,123,100'
$PictArray[274] = '135,100,201,100'
$PictArray[275] = '1,101,64,101'
$PictArray[276] = '77,101,123,101'
$PictArray[277] = '134,101,201,101'
$PictArray[278] = '1,102,64,102'
$PictArray[279] = '76,102,123,102'
$PictArray[280] = '134,102,201,102'
$PictArray[281] = '1,103,63,103'
$PictArray[282] = '76,103,123,103'
$PictArray[283] = '134,103,201,103'
$PictArray[284] = '1,104,62,104'
$PictArray[285] = '75,104,123,104'
$PictArray[286] = '134,104,201,104'
$PictArray[287] = '1,105,61,105'
$PictArray[288] = '74,105,123,105'
$PictArray[289] = '151,105,201,105'
$PictArray[290] = '1,106,60,106'
$PictArray[291] = '73,106,123,106'
$PictArray[292] = '158,106,201,106'
$PictArray[293] = '1,107,60,107'
$PictArray[294] = '72,107,123,107'
$PictArray[295] = '162,107,201,107'
$PictArray[296] = '1,108,59,108'
$PictArray[297] = '72,108,123,108'
$PictArray[298] = '167,108,201,108'
$PictArray[299] = '1,109,58,109'
$PictArray[300] = '71,109,123,109'
$PictArray[301] = '170,109,201,109'
$PictArray[302] = '1,110,57,110'
$PictArray[303] = '70,110,123,110'
$PictArray[304] = '173,110,201,110'
$PictArray[305] = '1,111,57,111'
$PictArray[306] = '69,111,123,111'
$PictArray[307] = '175,111,201,111'
$PictArray[308] = '1,112,56,112'
$PictArray[309] = '69,112,123,112'
$PictArray[310] = '177,112,201,112'
$PictArray[311] = '1,113,55,113'
$PictArray[312] = '68,113,123,113'
$PictArray[313] = '179,113,201,113'
$PictArray[314] = '1,114,54,114'
$PictArray[315] = '67,114,123,114'
$PictArray[316] = '181,114,201,114'
$PictArray[317] = '1,115,53,115'
$PictArray[318] = '67,115,145,115'
$PictArray[319] = '182,115,201,115'
$PictArray[320] = '1,116,52,116'
$PictArray[321] = '65,116,154,116'
$PictArray[322] = '184,116,201,116'
$PictArray[323] = '1,117,51,117'
$PictArray[324] = '65,117,162,117'
$PictArray[325] = '185,117,201,117'
$PictArray[326] = '1,118,48,118'
$PictArray[327] = '64,118,166,118'
$PictArray[328] = '187,118,201,118'
$PictArray[329] = '1,119,20,119'
$PictArray[330] = '63,119,169,119'
$PictArray[331] = '188,119,201,119'
$PictArray[332] = '1,120,19,120'
$PictArray[333] = '62,120,172,120'
$PictArray[334] = '189,120,201,120'
$PictArray[335] = '1,121,19,121'
$PictArray[336] = '61,121,174,121'
$PictArray[337] = '190,121,201,121'
$PictArray[338] = '1,122,18,122'
$PictArray[339] = '60,122,176,122'
$PictArray[340] = '190,122,201,122'
$PictArray[341] = '1,123,18,123'
$PictArray[342] = '59,123,178,123'
$PictArray[343] = '191,123,201,123'
$PictArray[344] = '1,124,17,124'
$PictArray[345] = '58,124,179,124'
$PictArray[346] = '192,124,201,124'
$PictArray[347] = '1,125,17,125'
$PictArray[348] = '57,125,181,125'
$PictArray[349] = '193,125,201,125'
$PictArray[350] = '1,126,17,126'
$PictArray[351] = '56,126,181,126'
$PictArray[352] = '193,126,201,126'
$PictArray[353] = '1,127,16,127'
$PictArray[354] = '54,127,136,127'
$PictArray[355] = '141,127,183,127'
$PictArray[356] = '194,127,201,127'
$PictArray[357] = '1,128,16,128'
$PictArray[358] = '51,128,128,128'
$PictArray[359] = '149,128,184,128'
$PictArray[360] = '194,128,201,128'
$PictArray[361] = '1,129,16,129'
$PictArray[362] = '46,129,126,129'
$PictArray[363] = '152,129,184,129'
$PictArray[364] = '195,129,201,129'
$PictArray[365] = '1,130,15,130'
$PictArray[366] = '26,130,123,130'
$PictArray[367] = '155,130,184,130'
$PictArray[368] = '195,130,201,130'
$PictArray[369] = '1,131,15,131'
$PictArray[370] = '26,131,121,131'
$PictArray[371] = '158,131,185,131'
$PictArray[372] = '196,131,201,131'
$PictArray[373] = '1,132,14,132'
$PictArray[374] = '26,132,120,132'
$PictArray[375] = '165,132,166,132'
$PictArray[376] = '167,132,185,132'
$PictArray[377] = '196,132,201,132'
$PictArray[378] = '1,133,14,133'
$PictArray[379] = '25,133,118,133'
$PictArray[380] = '175,133,186,133'
$PictArray[381] = '196,133,201,133'
$PictArray[382] = '1,134,14,134'
$PictArray[383] = '25,134,117,134'
$PictArray[384] = '174,134,186,134'
$PictArray[385] = '196,134,201,134'
$PictArray[386] = '1,135,13,135'
$PictArray[387] = '24,135,116,135'
$PictArray[388] = '173,135,186,135'
$PictArray[389] = '196,135,201,135'
$PictArray[390] = '1,136,13,136'
$PictArray[391] = '24,136,115,136'
$PictArray[392] = '172,136,186,136'
$PictArray[393] = '196,136,201,136'
$PictArray[394] = '1,137,13,137'
$PictArray[395] = '24,137,114,137'
$PictArray[396] = '131,137,143,137'
$PictArray[397] = '171,137,186,137'
$PictArray[398] = '196,137,201,137'
$PictArray[399] = '1,138,13,138'
$PictArray[400] = '24,138,113,138'
$PictArray[401] = '129,138,147,138'
$PictArray[402] = '170,138,186,138'
$PictArray[403] = '196,138,201,138'
$PictArray[404] = '1,139,13,139'
$PictArray[405] = '23,139,112,139'
$PictArray[406] = '126,139,149,139'
$PictArray[407] = '169,139,186,139'
$PictArray[408] = '196,139,201,139'
$PictArray[409] = '1,140,12,140'
$PictArray[410] = '23,140,111,140'
$PictArray[411] = '125,140,152,140'
$PictArray[412] = '169,140,186,140'
$PictArray[413] = '196,140,201,140'
$PictArray[414] = '1,141,12,141'
$PictArray[415] = '23,141,110,141'
$PictArray[416] = '124,141,155,141'
$PictArray[417] = '167,141,185,141'
$PictArray[418] = '196,141,201,141'
$PictArray[419] = '1,142,12,142'
$PictArray[420] = '23,142,110,142'
$PictArray[421] = '122,142,157,142'
$PictArray[422] = '166,142,185,142'
$PictArray[423] = '196,142,201,142'
$PictArray[424] = '1,143,12,143'
$PictArray[425] = '22,143,109,143'
$PictArray[426] = '121,143,185,143'
$PictArray[427] = '196,143,201,143'
$PictArray[428] = '1,144,11,144'
$PictArray[429] = '22,144,108,144'
$PictArray[430] = '120,144,185,144'
$PictArray[431] = '196,144,201,144'
$PictArray[432] = '1,145,11,145'
$PictArray[433] = '22,145,108,145'
$PictArray[434] = '120,145,184,145'
$PictArray[435] = '196,145,201,145'
$PictArray[436] = '1,146,11,146'
$PictArray[437] = '22,146,107,146'
$PictArray[438] = '119,146,184,146'
$PictArray[439] = '195,146,201,146'
$PictArray[440] = '1,147,11,147'
$PictArray[441] = '22,147,107,147'
$PictArray[442] = '120,147,184,147'
$PictArray[443] = '195,147,201,147'
$PictArray[444] = '1,148,11,148'
$PictArray[445] = '21,148,106,148'
$PictArray[446] = '122,148,183,148'
$PictArray[447] = '195,148,201,148'
$PictArray[448] = '1,149,11,149'
$PictArray[449] = '21,149,106,149'
$PictArray[450] = '125,149,182,149'
$PictArray[451] = '194,149,201,149'
$PictArray[452] = '1,150,10,150'
$PictArray[453] = '21,150,105,150'
$PictArray[454] = '126,150,182,150'
$PictArray[455] = '194,150,201,150'
$PictArray[456] = '1,151,10,151'
$PictArray[457] = '21,151,105,151'
$PictArray[458] = '129,151,181,151'
$PictArray[459] = '193,151,201,151'
$PictArray[460] = '1,152,10,152'
$PictArray[461] = '21,152,107,152'
$PictArray[462] = '131,152,180,152'
$PictArray[463] = '193,152,201,152'
$PictArray[464] = '1,153,10,153'
$PictArray[465] = '21,153,109,153'
$PictArray[466] = '133,153,179,153'
$PictArray[467] = '192,153,201,153'
$PictArray[468] = '1,154,10,154'
$PictArray[469] = '21,154,109,154'
$PictArray[470] = '135,154,178,154'
$PictArray[471] = '192,154,201,154'
$PictArray[472] = '1,155,10,155'
$PictArray[473] = '21,155,108,155'
$PictArray[474] = '138,155,177,155'
$PictArray[475] = '191,155,201,155'
$PictArray[476] = '1,156,10,156'
$PictArray[477] = '21,156,106,156'
$PictArray[478] = '140,156,176,156'
$PictArray[479] = '191,156,201,156'
$PictArray[480] = '1,157,10,157'
$PictArray[481] = '21,157,105,157'
$PictArray[482] = '142,157,174,157'
$PictArray[483] = '190,157,201,157'
$PictArray[484] = '1,158,10,158'
$PictArray[485] = '21,158,104,158'
$PictArray[486] = '144,158,173,158'
$PictArray[487] = '189,158,201,158'
$PictArray[488] = '1,159,10,159'
$PictArray[489] = '20,159,103,159'
$PictArray[490] = '121,159,122,159'
$PictArray[491] = '147,159,170,159'
$PictArray[492] = '188,159,201,159'
$PictArray[493] = '1,160,10,160'
$PictArray[494] = '20,160,102,160'
$PictArray[495] = '118,160,124,160'
$PictArray[496] = '149,160,166,160'
$PictArray[497] = '187,160,201,160'
$PictArray[498] = '1,161,10,161'
$PictArray[499] = '20,161,101,161'
$PictArray[500] = '116,161,126,161'
$PictArray[501] = '187,161,201,161'
$PictArray[502] = '1,162,10,162'
$PictArray[503] = '20,162,100,162'
$PictArray[504] = '115,162,129,162'
$PictArray[505] = '188,162,201,162'
$PictArray[506] = '1,163,10,163'
$PictArray[507] = '20,163,99,163'
$PictArray[508] = '113,163,131,163'
$PictArray[509] = '188,163,201,163'
$PictArray[510] = '1,164,10,164'
$PictArray[511] = '20,164,98,164'
$PictArray[512] = '112,164,133,164'
$PictArray[513] = '189,164,201,164'
$PictArray[514] = '1,165,10,165'
$PictArray[515] = '20,165,98,165'
$PictArray[516] = '111,165,135,165'
$PictArray[517] = '189,165,201,165'
$PictArray[518] = '1,166,10,166'
$PictArray[519] = '20,166,97,166'
$PictArray[520] = '110,166,138,166'
$PictArray[521] = '189,166,201,166'
$PictArray[522] = '1,167,10,167'
$PictArray[523] = '20,167,96,167'
$PictArray[524] = '109,167,140,167'
$PictArray[525] = '190,167,201,167'
$PictArray[526] = '1,168,10,168'
$PictArray[527] = '20,168,96,168'
$PictArray[528] = '108,168,142,168'
$PictArray[529] = '176,168,178,168'
$PictArray[530] = '190,168,201,168'
$PictArray[531] = '1,169,10,169'
$PictArray[532] = '21,169,95,169'
$PictArray[533] = '109,169,144,169'
$PictArray[534] = '173,169,179,169'
$PictArray[535] = '190,169,201,169'
$PictArray[536] = '1,170,10,170'
$PictArray[537] = '21,170,95,170'
$PictArray[538] = '111,170,147,170'
$PictArray[539] = '169,170,179,170'
$PictArray[540] = '190,170,201,170'
$PictArray[541] = '1,171,10,171'
$PictArray[542] = '21,171,94,171'
$PictArray[543] = '113,171,180,171'
$PictArray[544] = '190,171,201,171'
$PictArray[545] = '1,172,10,172'
$PictArray[546] = '21,172,94,172'
$PictArray[547] = '115,172,180,172'
$PictArray[548] = '190,172,201,172'
$PictArray[549] = '1,173,10,173'
$PictArray[550] = '21,173,94,173'
$PictArray[551] = '118,173,180,173'
$PictArray[552] = '190,173,201,173'
$PictArray[553] = '1,174,10,174'
$PictArray[554] = '21,174,95,174'
$PictArray[555] = '120,174,180,174'
$PictArray[556] = '190,174,201,174'
$PictArray[557] = '1,175,11,175'
$PictArray[558] = '21,175,98,175'
$PictArray[559] = '122,175,179,175'
$PictArray[560] = '190,175,201,175'
$PictArray[561] = '1,176,11,176'
$PictArray[562] = '21,176,100,176'
$PictArray[563] = '125,176,179,176'
$PictArray[564] = '190,176,201,176'
$PictArray[565] = '1,177,11,177'
$PictArray[566] = '21,177,98,177'
$PictArray[567] = '127,177,178,177'
$PictArray[568] = '190,177,201,177'
$PictArray[569] = '1,178,11,178'
$PictArray[570] = '21,178,97,178'
$PictArray[571] = '129,178,178,178'
$PictArray[572] = '190,178,201,178'
$PictArray[573] = '1,179,11,179'
$PictArray[574] = '22,179,96,179'
$PictArray[575] = '131,179,176,179'
$PictArray[576] = '189,179,201,179'
$PictArray[577] = '1,180,11,180'
$PictArray[578] = '22,180,95,180'
$PictArray[579] = '133,180,175,180'
$PictArray[580] = '189,180,201,180'
$PictArray[581] = '1,181,12,181'
$PictArray[582] = '22,181,94,181'
$PictArray[583] = '110,181,111,181'
$PictArray[584] = '136,181,172,181'
$PictArray[585] = '189,181,201,181'
$PictArray[586] = '1,182,12,182'
$PictArray[587] = '22,182,93,182'
$PictArray[588] = '108,182,114,182'
$PictArray[589] = '138,182,168,182'
$PictArray[590] = '188,182,201,182'
$PictArray[591] = '1,183,12,183'
$PictArray[592] = '23,183,92,183'
$PictArray[593] = '107,183,115,183'
$PictArray[594] = '187,183,201,183'
$PictArray[595] = '1,184,12,184'
$PictArray[596] = '23,184,91,184'
$PictArray[597] = '106,184,118,184'
$PictArray[598] = '187,184,201,184'
$PictArray[599] = '1,185,13,185'
$PictArray[600] = '23,185,91,185'
$PictArray[601] = '104,185,120,185'
$PictArray[602] = '186,185,201,185'
$PictArray[603] = '1,186,13,186'
$PictArray[604] = '23,186,90,186'
$PictArray[605] = '103,186,122,186'
$PictArray[606] = '185,186,201,186'
$PictArray[607] = '1,187,13,187'
$PictArray[608] = '24,187,89,187'
$PictArray[609] = '102,187,124,187'
$PictArray[610] = '183,187,201,187'
$PictArray[611] = '1,188,13,188'
$PictArray[612] = '24,188,89,188'
$PictArray[613] = '101,188,127,188'
$PictArray[614] = '182,188,201,188'
$PictArray[615] = '1,189,13,189'
$PictArray[616] = '24,189,88,189'
$PictArray[617] = '100,189,129,189'
$PictArray[618] = '180,189,201,189'
$PictArray[619] = '1,190,14,190'
$PictArray[620] = '24,190,87,190'
$PictArray[621] = '101,190,131,190'
$PictArray[622] = '178,190,201,190'
$PictArray[623] = '1,191,14,191'
$PictArray[624] = '24,191,87,191'
$PictArray[625] = '103,191,134,191'
$PictArray[626] = '176,191,201,191'
$PictArray[627] = '1,192,14,192'
$PictArray[628] = '25,192,86,192'
$PictArray[629] = '106,192,136,192'
$PictArray[630] = '176,192,201,192'
$PictArray[631] = '1,193,14,193'
$PictArray[632] = '25,193,86,193'
$PictArray[633] = '108,193,138,193'
$PictArray[634] = '142,193,167,193'
$PictArray[635] = '176,193,201,193'
$PictArray[636] = '1,194,15,194'
$PictArray[637] = '26,194,86,194'
$PictArray[638] = '110,194,167,194'
$PictArray[639] = '176,194,201,194'
$PictArray[640] = '1,195,15,195'
$PictArray[641] = '51,195,88,195'
$PictArray[642] = '112,195,167,195'
$PictArray[643] = '177,195,201,195'
$PictArray[644] = '1,196,16,196'
$PictArray[645] = '51,196,90,196'
$PictArray[646] = '115,196,167,196'
$PictArray[647] = '176,196,201,196'
$PictArray[648] = '1,197,16,197'
$PictArray[649] = '52,197,92,197'
$PictArray[650] = '117,197,166,197'
$PictArray[651] = '176,197,201,197'
$PictArray[652] = '1,198,16,198'
$PictArray[653] = '53,198,94,198'
$PictArray[654] = '119,198,166,198'
$PictArray[655] = '176,198,201,198'
$PictArray[656] = '1,199,16,199'
$PictArray[657] = '54,199,96,199'
$PictArray[658] = '122,199,165,199'
$PictArray[659] = '176,199,201,199'
$PictArray[660] = '1,200,17,200'
$PictArray[661] = '55,200,94,200'
$PictArray[662] = '124,200,164,200'
$PictArray[663] = '176,200,201,200'
$PictArray[664] = '1,201,17,201'
$PictArray[665] = '56,201,93,201'
$PictArray[666] = '126,201,163,201'
$PictArray[667] = '176,201,201,201'
$PictArray[668] = '1,202,18,202'
$PictArray[669] = '56,202,92,202'
$PictArray[670] = '128,202,161,202'
$PictArray[671] = '176,202,201,202'
$PictArray[672] = '1,203,18,203'
$PictArray[673] = '57,203,91,203'
$PictArray[674] = '130,203,159,203'
$PictArray[675] = '175,203,201,203'
$PictArray[676] = '1,204,19,204'
$PictArray[677] = '58,204,90,204'
$PictArray[678] = '105,204,107,204'
$PictArray[679] = '132,204,151,204'
$PictArray[680] = '175,204,201,204'
$PictArray[681] = '1,205,46,205'
$PictArray[682] = '59,205,89,205'
$PictArray[683] = '104,205,110,205'
$PictArray[684] = '174,205,201,205'
$PictArray[685] = '1,206,47,206'
$PictArray[686] = '60,206,89,206'
$PictArray[687] = '103,206,112,206'
$PictArray[688] = '173,206,201,206'
$PictArray[689] = '1,207,48,207'
$PictArray[690] = '61,207,88,207'
$PictArray[691] = '102,207,114,207'
$PictArray[692] = '173,207,201,207'
$PictArray[693] = '1,208,49,208'
$PictArray[694] = '62,208,87,208'
$PictArray[695] = '101,208,116,208'
$PictArray[696] = '172,208,201,208'
$PictArray[697] = '1,209,49,209'
$PictArray[698] = '63,209,87,209'
$PictArray[699] = '100,209,119,209'
$PictArray[700] = '171,209,201,209'
$PictArray[701] = '1,210,50,210'
$PictArray[702] = '64,210,86,210'
$PictArray[703] = '99,210,121,210'
$PictArray[704] = '169,210,201,210'
$PictArray[705] = '1,211,51,211'
$PictArray[706] = '65,211,85,211'
$PictArray[707] = '98,211,123,211'
$PictArray[708] = '168,211,201,211'
$PictArray[709] = '1,212,52,212'
$PictArray[710] = '67,212,84,212'
$PictArray[711] = '97,212,125,212'
$PictArray[712] = '166,212,201,212'
$PictArray[713] = '1,213,53,213'
$PictArray[714] = '68,213,84,213'
$PictArray[715] = '97,213,128,213'
$PictArray[716] = '163,213,201,213'
$PictArray[717] = '1,214,54,214'
$PictArray[718] = '69,214,83,214'
$PictArray[719] = '97,214,130,214'
$PictArray[720] = '157,214,201,214'
$PictArray[721] = '1,215,55,215'
$PictArray[722] = '70,215,83,215'
$PictArray[723] = '100,215,147,215'
$PictArray[724] = '157,215,201,215'
$PictArray[725] = '1,216,57,216'
$PictArray[726] = '71,216,82,216'
$PictArray[727] = '102,216,147,216'
$PictArray[728] = '158,216,201,216'
$PictArray[729] = '1,217,58,217'
$PictArray[730] = '73,217,82,217'
$PictArray[731] = '104,217,147,217'
$PictArray[732] = '158,217,201,217'
$PictArray[733] = '1,218,59,218'
$PictArray[734] = '74,218,82,218'
$PictArray[735] = '106,218,147,218'
$PictArray[736] = '158,218,201,218'
$PictArray[737] = '1,219,60,219'
$PictArray[738] = '76,219,84,219'
$PictArray[739] = '108,219,147,219'
$PictArray[740] = '157,219,201,219'
$PictArray[741] = '1,220,61,220'
$PictArray[742] = '77,220,87,220'
$PictArray[743] = '110,220,146,220'
$PictArray[744] = '157,220,201,220'
$PictArray[745] = '1,221,62,221'
$PictArray[746] = '78,221,89,221'
$PictArray[747] = '113,221,146,221'
$PictArray[748] = '157,221,201,221'
$PictArray[749] = '1,222,64,222'
$PictArray[750] = '79,222,91,222'
$PictArray[751] = '115,222,145,222'
$PictArray[752] = '157,222,201,222'
$PictArray[753] = '1,223,65,223'
$PictArray[754] = '81,223,93,223'
$PictArray[755] = '117,223,144,223'
$PictArray[756] = '157,223,201,223'
$PictArray[757] = '1,224,66,224'
$PictArray[758] = '83,224,95,224'
$PictArray[759] = '119,224,142,224'
$PictArray[760] = '156,224,201,224'
$PictArray[761] = '1,225,67,225'
$PictArray[762] = '84,225,98,225'
$PictArray[763] = '122,225,140,225'
$PictArray[764] = '156,225,201,225'
$PictArray[765] = '1,226,69,226'
$PictArray[766] = '86,226,100,226'
$PictArray[767] = '124,226,137,226'
$PictArray[768] = '155,226,201,226'
$PictArray[769] = '1,227,70,227'
$PictArray[770] = '88,227,102,227'
$PictArray[771] = '155,227,201,227'
$PictArray[772] = '1,228,72,228'
$PictArray[773] = '154,228,201,228'
$PictArray[774] = '1,229,74,229'
$PictArray[775] = '153,229,201,229'
$PictArray[776] = '1,230,75,230'
$PictArray[777] = '152,230,201,230'
$PictArray[778] = '1,231,77,231'
$PictArray[779] = '151,231,201,231'
$PictArray[780] = '1,232,79,232'
$PictArray[781] = '149,232,201,232'
$PictArray[782] = '1,233,80,233'
$PictArray[783] = '148,233,201,233'
$PictArray[784] = '1,234,82,234'
$PictArray[785] = '112,234,118,234'
$PictArray[786] = '145,234,201,234'
$PictArray[787] = '1,235,84,235'
$PictArray[788] = '108,235,121,235'
$PictArray[789] = '142,235,201,235'
$PictArray[790] = '1,236,86,236'
$PictArray[791] = '103,236,121,236'
$PictArray[792] = '138,236,201,236'
$PictArray[793] = '1,237,201,237'
$PictArray[794] = '1,238,201,238'
$PictArray[795] = '1,239,201,239'
$PictArray[796] = '1,240,201,240'
$PictArray[797] = '1,241,201,241'
$PictArray[798] = '1,242,201,242'
$PictArray[799] = '1,243,201,243'
$PictArray[800] = '1,244,201,244'
$PictArray[801] = '1,245,201,245'
$PictArray[802] = '1,246,201,246'
$PictArray[803] = '1,247,201,247'
$PictArray[804] = '1,248,201,248'
$PictArray[805] = '1,249,201,249'
$PictArray[806] = '1,250,201,250'
$PictArray[807] = '1,251,201,251'
$PictArray[808] = '1,252,201,252'
$PictArray[809] = '1,253,201,253'
$PictArray[810] = '1,254,201,254'
$PictArray[811] = '1,255,201,255'
$PictArray[812] = '1,256,201,256'
$PictArray[813] = '1,257,201,257'
$PictArray[814] = '1,258,201,258'
$PictArray[815] = '1,259,201,259'
#EndRegion picture array

    ; get the size of the active window
    $size = WinGetClientSize($window_handle)
    $Window_width = $size[0]
    $Window_height = $size[1] + 40 ; include height of title bar up to 30 dots
    ; First hide the window
    $aClassList = StringSplit(_WinGetClassListEx($window_handle), @LF)
    $aM_Mask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', 0, 'long', 0)
    ; rectangle A - left side
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $pos_x, 'long', $Window_height)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; rectangle B - Top
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $Window_width, 'long', $pos_y)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; rectangle C - Right side
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x  + $Image_Width , 'long', 0 , 'long', $Window_width + 30, 'long', $Window_height)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; rectangle D - Bottom
    $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0 , 'long', $pos_y + $Image_Height, 'long', $Window_width, 'long', $Window_height)
    DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    ; now unhide all regions as defined  in array $PictArray
    For $i = 0 To (UBound($PictArray) - 1)
        $Block_value = StringSplit($PictArray[$i],',')
        $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Block_value[1] - 2 , 'long', $pos_y + $Block_value[2], 'long', $pos_x + $Block_value[3], 'long', $pos_y + $Block_value[4] -1)
        DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2)
    Next
    DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $window_handle, 'long', $aM_Mask[0], 'int', 1)
    $PictArray='' ; empty array
EndFunc  ;==>_GuiImageHole
#FUNCTION# ==============================================================
Func _WinGetClassListEx($sTitle)
    Local $sClassList = WinGetClassList($sTitle)
    Local $aClassList = StringSplit($sClassList, @LF)
    Local $sRetClassList = '', $sHold_List = '|'
    Local $aiInHold, $iInHold
    For $i = 1 To UBound($aClassList) - 1
        If $aClassList[$i] = '' Then ContinueLoop
        If StringRegExp($sHold_List, '\|' & $aClassList[$i] & '~(\d+)\|') Then
            $aiInHold = StringRegExp($sHold_List, '.*\|' & $aClassList[$i] & '~(\d+)\|.*', 1)
            $iInHold = Number($aiInHold[UBound($aiInHold)-1])
            If $iInHold = 0 Then $iInHold += 1
            $aClassList[$i] &= '~' & $iInHold + 1
            $sHold_List &= $aClassList[$i] & '|'
            $sRetClassList &= $aClassList[$i] & @LF
        Else
            $aClassList[$i] &= '~1'
            $sHold_List &= $aClassList[$i] & '|'
            $sRetClassList &= $aClassList[$i] & @LF
        EndIf
    Next
    Return StringReplace(StringStripWS($sRetClassList, 3), '~', '')
EndFunc ;==>_WinGetClassListEx
#FUNCTION# ==============================================================
#EndRegion Perforated Image

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

Hello from the GreenMartian project!

Martin,

You can quite easily scale the drawing. Change $Scale to make it grow or shrink, the curves are not (yet) perfect though.

Question:

What do you find to draw between element 1757 and 1759, a dot?

GreenCan

Scalable_outlineEx01.au3

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

Hello from the GreenMartian project!

Martin,

You can quite easily scale the drawing. Change $Scale to make it grow or shrink, the curves are not (yet) perfect though.

Yes, I've played with scaling.

The curves are certainly not perfect. When you say "yet" have you got anything in mind? I did wonder about curve fitting, bezier curves or something. I've never tried that but it would be required for a real application I think.

Question:

What do you find to draw between element 1757 and 1759, a dot?

Not a lot. I don't think that will even produce a dot in my script. It's something I'll have to think about.

I make an array of all the dots with 3 columns. [x][y][drawn]. I start with a point then find the nearest point to that within an allowed range and add it to a new array then find the next nearest point. Every time I use a point from the list I mark it as drawn. If there is no nearby undrawn point I look to see if I have come back to where I started within so many pixels. If I have then I assume it was an enclosed shape and I close the shape by drawing back to the first point. I mark the end of the shape with a -99,0 coordinate and start a new shape starting with the nearest unused point from where I stopped. This makes it likely, but not certain, that I draw the centre of a letter thtaI've just drawn, like an "a", before drawing the next letter or shape. It doesn't really matter because they will all get drawn eventually anyway but it looks better if you watch it.

If there are 3 points together, say one point with another to the right and another below, then when I construct the line I will draw through the two horizontal pixels and leave the bottom one out possibly depending on which direction I am drawing. So the one left out becomes a new shape consisting of one point. Probably the easiest thing to do is to just delete those single points.

I am surpised you noticed it; I don't tend to look at my own work that closely! :)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...