Thank you, but i must return the compliment - especially for your Setting-based icons.
I thought of them, but hadn't the courage to launch them, the same with the diskette symbol for 'Save'.
trials - I think for the moment the last ones.
Among the 'Open' icons i had 3 to choose from.
With the 'folder'-design i've gotten some color problems and as quick way out, i defined 2 new colors: goldenrod, goldenrod4 (CSS names)
Please convert them in your idea of the color scheme and -set. And again feel free to improve the code or designs.
What about using OS indepentent CSS-colors? I have a table here, usable with PB, API (mirrored color ordner), CSS-themes, HTML, ...
But first a smarter Update for the Macro UnRedo() (originally i've posted the old, unpolished one)
Code: Select all
Declare.i Download (img.i, size.i, color.i, color2.i=0)
Declare.i New1 (img.i, size.i, color.i, color2.i)
Declare.i Open1 (img.i, size.i, color.i, color2.i=0)
Declare.i Open2 (img.i, size.i, color1.i, color2.i, color3.i= 0)
;Declare.i Open3 (img.i, size.i, color.i, color2.i=0)
Declare.i Save2 (img.i, size.i, color.i, color2.i=0)
Declare.i SaveAs2 (img.i, size.i, color.i, color2.i=0)
Declare.i Printer1 (img.i, size.i, color.i, color2.i, color3.i)
#ImgDownload
#ImgNew1
#ImgOpen1
#ImgOpen2
;#ImgOpen3
#ImgSave2
#ImgSaveAs2
#ImgPrinter1
Data.s "Download", "New1", "Open1", "Open2", "Save2", "SaveAs2", "Printer1";, "Open3"
;temp. color defs...
;", goldenrod, goldenrod4"
goldenrod = RGBA(218, 165, 32, 255)
goldenrod4= RGBA(139, 105, 20, 255)
VectorIcons::Download(#ImgDownload, size, green, white)
VectorIcons::New1(#ImgNew1, size, blue, red)
VectorIcons::Open1(#ImgOpen1, size, goldenrod, grey)
VectorIcons::Open2(#ImgOpen2, size, goldenrod, blue, white)
;VectorIcons::Open3(#ImgOpen3, size, goldenrod, goldenrod4)
VectorIcons::Save2(#ImgSave2, size, blue, white)
VectorIcons::SaveAs2(#ImgSaveAs2, size, blue, white)
VectorIcons::Printer1(#ImgPrinter1, size, lightgrey, grey, white)
VectorIcons::Download(#ImgDownload + #IconCount, size, lightgrey, darkwhite)
VectorIcons::New1(#ImgNew1 + #IconCount, size, lightgrey, lightgrey)
VectorIcons::Open1(#ImgOpen1 + #IconCount, size, lightgrey, darkwhite)
VectorIcons::Open2(#ImgOpen2 + #IconCount, size, lightgrey, lightgrey, darkwhite)
;VectorIcons::Open3(#ImgOpen3 + #IconCount, size, lightgrey, lightgrey)
VectorIcons::Save2(#ImgSave2 + #IconCount, size, lightgrey, darkwhite)
VectorIcons::SaveAs2(#ImgSaveAs2 + #IconCount, size, lightgrey, darkwhite)
VectorIcons::Printer1(#ImgPrinter1 + #IconCount, size, lightgrey, lightgrey, darkwhite)
Procedure.i Download (img.i, size.i, color1.i, color2.i= 0)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color1: foreground color #1
; color2: foreground color #2 (default = 0: 100% transparent)
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [org. by Omi]
Protected ret.i
Protected p8.d = size / 8
Protected p4.d = size / 4
Protected p2.d = size / 2
ret= CreateImage(img, size, size, 32, #Background)
If ret
If img = #PB_Any
img= ret
EndIf
If StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color1)
;panel: round corners
AddPathBox(p8, p8, size - p4, size - p4)
FillPath()
AddPathBox(p8, p8, size - p4, size - p4)
StrokePath(p4, #PB_Path_RoundCorner)
;arrow
VectorSourceColor(color2)
MovePathCursor(p2, p8)
AddPathLine (p2, size - p4)
StrokePath (size/5)
MovePathCursor(p2 - p4, size - p2 + p8)
AddPathLine (p2 + p4, size - p2 + p8)
AddPathLine (p2, size - p8)
ClosePath()
FillPath()
StopVectorDrawing()
EndIf
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i New1 (img.i, size.i, color.i, color2.i)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color1: foreground color #1
; color2: foreground color #2
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [org. by Omi]
Protected ret.i
Protected p.d = size / 32
Protected p16 = size / 16
Protected p8 = size / 8
Protected p4 = size / 4
Protected p2 = size / 2
ret = CreateImage(img, size, size, 32, #Background)
If ret
If img = #PB_Any
img = ret
EndIf
If StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color)
;frame
MovePathCursor(p8, p16)
AddPathLine (size - p4 - p16, p16)
AddPathLine (size - p8, p4)
AddPathLine (size - p8, size - p16)
AddPathLine (p8, size - p16)
ClosePath ()
StrokePath (p16)
;dog-ear
MovePathCursor(size - p4 - p16, p16)
AddPathLine (size - p4 - p16, p4)
AddPathLine (size - p8, p4)
StrokePath (p)
;lines
MovePathCursor( 7 * p, 9 * p)
AddPathLine (19 * p, 9 * p)
MovePathCursor( 7 * p, 13 * p)
AddPathLine (24 * p, 13 * p)
MovePathCursor( 7 * p, 17 * p)
AddPathLine (17 * p, 17 * p)
MovePathCursor( 7 * p, 21 * p)
AddPathLine (19 * p, 21 * p)
MovePathCursor( 7 * p, 25 * p)
AddPathLine (15 * p, 25 * p)
StrokePath (p)
;+
VectorSourceColor(color2)
MovePathCursor(size - p4 - p16, size - p8 - p4)
AddPathLine (size - p4 - p16, size - p8)
MovePathCursor(p2 + p16, size - p4)
AddPathLine (size - p8 - p16, size - p4)
StrokePath (p16)
StopVectorDrawing()
Else
FreeImage(img)
ret = 0
EndIf
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i Open1 (img.i, size.i, color1.i, color2.i= 0)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color1: foreground color #1
; color2: foreground color #2 (default = 0: 100% transparent)
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [org. by Omi]
Protected ret.i
Protected p64.d= size / 64
Protected p.d = size / 32
Protected p16.d= size / 16
Protected p8.f = size / 8
Protected p4.d = size / 4
Protected p2.d = size / 2
ret= CreateImage(img, size, size, 32, #Background)
If ret
If img = #PB_Any
img= ret
EndIf
If StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color1)
;box: round corners
AddPathBox (p16, p4 + p8, size - p8, size - p2 - p)
StrokePath (p8, #PB_Path_RoundCorner)
AddPathBox (p16, p4 + p8, size - p8, size - p2 - p)
FillPath ()
;card
MovePathCursor(p16, p2)
AddPathArc (p16, p8, p4 + p8, p8, p16)
AddPathArc (p4 + p8, p8, p4 + p8, p4 - p, p16 - p64)
AddPathArc (p4 + p8, p4 - p, size - p16, p4 - p, p16 - p64)
AddPathArc (size - p16, p4 - p, size - p16, p2, p16)
AddPathLine (size - p16, p2)
StrokePath (p16)
StopVectorDrawing()
EndIf
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i Open2 (img.i, size.i, color1.i, color2.i, color3.i= 0)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color1: foreground color #1
; color2: foreground color #2 (default = 0: 100% transparent)
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [org. by Omi]
Protected ret.i
Protected p64.d= size / 64
Protected p.d = size / 32
Protected p16.d= size / 16
Protected p8.d = size / 8
Protected p4.d = size / 4
Protected p2.d = size / 2
ret= CreateImage(img, size, size, 32, #Background)
If ret
If img = #PB_Any
img= ret
EndIf
If StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color1)
;card
MovePathCursor(p16, p2)
AddPathArc (p16, p4, p4 + p16, p4, p16)
AddPathArc (p4 + p16, p4, p4 + p16, p4 + p16 + p, p16 - p64)
AddPathArc (p4 + p16, p4 + p16 + p, size - p8 - p16, p4 + p16 + p, p16 - p64)
StrokePath (p16)
;sheet
VectorSourceColor(color3)
MovePathCursor(p4 + p8, p2 + p4)
AddPathLine (p4 + p8, p)
AddPathLine (size - p4, p)
AddPathLine (size - p, p4)
AddPathLine (size - p, p2 + p4)
ClosePath()
FillPath()
;frame
VectorSourceColor(color2)
MovePathCursor(p4 + p8, p2 + p4)
AddPathLine (p4 + p8, p)
AddPathLine (size - p4, p)
AddPathLine (size - p, p4)
AddPathLine (size - p, p2 + p4)
ClosePath()
;dog-ear
MovePathCursor(size - p4, p)
AddPathLine (size - p4, p4)
AddPathLine (size - p, p4)
StrokePath (p)
;lines
MovePathCursor(15 * p, 6 * p)
AddPathLine (19 * p, 6 * p)
MovePathCursor(15 * p, 9 * p)
AddPathLine (24 * p, 9 * p)
MovePathCursor(15 * p, 12 * p)
AddPathLine (22 * p, 12 * p)
StrokePath (p)
;box: round corners
VectorSourceColor(color1)
AddPathBox (p16, p2, size - p4, size - p2 - p16)
StrokePath (p8, #PB_Path_RoundCorner)
AddPathBox (p16, p2, size - p4, size - p2 - p16)
FillPath ()
StopVectorDrawing()
EndIf
EndIf
ProcedureReturn ret
EndProcedure
; Procedure.i Open3 (img.i, size.i, color1.i, color2.i= 0)
; ; in : img : number of the image which is to be created, or #PB_Any
; ; size : width and height (number of pixels)
; ; color1: foreground color #1
; ; color2: foreground color #2 (default = 0: 100% transparent)
; ; out: return value: if img = #Pb_Any => number of the created image,
; ; error => 0
; ; [org. by Omi]
; Protected ret.i
; Protected p64.d= size / 64
; Protected p.d = size / 32
; Protected p16.d= size / 16
; Protected p8.d = size / 8
; Protected p4.d = size / 4
; Protected p2.d = size / 2
;
; ret= CreateImage(img, size, size, 32, #Background)
;
; If ret
; If img = #PB_Any
; img= ret
; EndIf
;
; If StartVectorDrawing(ImageVectorOutput(img))
; VectorSourceColor(color1)
;
; ;card
; MovePathCursor(p16, p2)
; AddPathArc (p16, p4, p4 + p16, p4, p16)
; AddPathArc (p4 + p16, p4, p4 + p16, p4 + p16 + p, p16 - p64)
; AddPathArc (p4 + p16, p4 + p16 + p, size - p4, p4 + p16 + p, p16 - p64)
; AddPathArc (size - p4, p4 + p16 + p, size - p4, p2, p16)
; AddPathLine (size - p4, p2)
; StrokePath (p16)
;
; ;box: round corners
; VectorSourceColor(color1)
; AddPathBox (p16, p2, size - p4 - p16, size - p2 - p16)
; StrokePath (p8, #PB_Path_RoundCorner)
; AddPathBox (p16, p2, size - p4 - p16, size - p2 - p16)
; FillPath ()
;
; VectorSourceColor(color2)
; MovePathCursor((p + p4) / 2, (size - p16 + p2 + p4) / 2)
; AddPathArc (p4, p2 + p4, size - p16, p2 + p4, p)
; AddPathArc (size - p16, p2 + p4, size - p4 , size - p16, p)
; AddPathArc (size - p4, size - p16, p, size - p16, p)
; AddPathArc (p, size - p16, (p + p4) / 2, (size - p16 + p2 + p4) / 2, p)
; ClosePath ()
; StrokePath (p8)
;
; MovePathCursor((p + p4) / 2, (size - p16 + p2 + p4) / 2)
; AddPathArc (p4, p2 + p4, size - p16, p2 + p4, p)
; AddPathArc (size - p16, p2 + p4, size - p4 , size - p16, p)
; AddPathArc (size - p4, size - p16, p, size - p16, p)
; AddPathArc (p, size - p16, (p + p4) / 2, (size - p16 + p2 + p4) / 2, p)
; ClosePath ()
; FillPath ()
;
; StopVectorDrawing()
; EndIf
; EndIf
;
; ProcedureReturn ret
; EndProcedure
Procedure.i Save2 (img.i, size.i, color1.i, color2.i= 0)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color1: foreground color #1
; color2: foreground color #2 (default = 0: 100% transparent)
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [org. by Omi]
Protected ret.i
Protected p16.d= size / 16
Protected p8.d = size / 8
Protected p4.d = size / 4
Protected p2.d = size / 2
ret= CreateImage(img, size, size, 32, #Background)
If ret
If img = #PB_Any
img= ret
EndIf
If StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color1)
;box: round corners
AddPathBox(p8, p16, size - 2 * p8, size - p8)
StrokePath(p8, #PB_Path_RoundCorner)
VectorSourceColor(color2)
AddPathBox(p8, p16, size - 2 * p8, size - p8)
FillPath()
;arrow
VectorSourceColor(color1)
MovePathCursor(p2, p4)
AddPathLine (p2, p2)
StrokePath (p4)
MovePathCursor(p2 - p4, p2)
AddPathLine (p2 + p4, p2)
AddPathLine (p2, size - p4)
ClosePath()
FillPath()
StopVectorDrawing()
EndIf
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i SaveAs2 (img.i, size.i, color1.i, color2.i= 0)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color1: foreground color #1
; color2: foreground color #2 (default = 0: 100% transparent)
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [org. by Omi]
Protected ret.i
Protected p.d = size / 32
Protected p16.d= size / 16
Protected p8.d = size / 8
Protected p4.d = size / 4
Protected p2.d = size / 2
ret= CreateImage(img, size, size, 32, #Background)
If ret
If img = #PB_Any
img= ret
EndIf
If StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color1)
;box: round corners
AddPathBox(p16, p, p2, p4 - p * 2)
FillPath()
AddPathBox(p16, p, size - p8, p4 - p * 2)
StrokePath(p16)
AddPathBox(p8, p4, size - p4, size - p4 - p16)
StrokePath(p8, #PB_Path_RoundCorner)
VectorSourceColor(color2)
AddPathBox(p8, p4, size - p4, size - p4 - p16)
FillPath()
;arrow
VectorSourceColor(color1)
MovePathCursor(p2, p2 - p8)
AddPathLine (p2, p2 + p8)
StrokePath (p4)
MovePathCursor(p2 - p4, p2 + p8)
AddPathLine (p2 + p4, p2 + p8)
AddPathLine (p2, size - p8)
ClosePath()
FillPath()
StopVectorDrawing()
EndIf
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i Printer1 (img.i, size.i, color.i, color2.i, color3.i)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color1: foreground color #1
; color2: foreground color #2
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [org. by Omi]
Protected ret.i
Protected p.d = size / 32
Protected p16.d = size / 16
Protected p8.d = size / 8
Protected p4.d = size / 4
Protected p2.d = size / 2
Protected w.d = p * 20
Protected h.d = p * 24
ret = CreateImage(img, size, size, 32, #Background)
If ret
If img = #PB_Any
img = ret
EndIf
If StartVectorDrawing(ImageVectorOutput(img))
;printer
VectorSourceColor(color2)
AddPathBox (p16, p2, size - p8, p4)
StrokePath (p8, #PB_Path_RoundCorner)
AddPathBox (p, p2, size - p16, p4 + p8)
FillPath ()
StrokePath (p)
;sheet top
VectorSourceColor(color2)
AddPathBox (p8 + p16, p, w, p2)
StrokePath (2 * p, #PB_Path_RoundCorner)
VectorSourceColor(color3)
AddPathBox (p8 + p16, p, w, p2)
FillPath ()
StrokePath (p)
;lines
VectorSourceColor(color2)
MovePathCursor( 8 * p, 4 * p)
AddPathLine (17 * p, 4 * p)
MovePathCursor( 8 * p, 7 * p)
AddPathLine (19 * p, 7 * p)
MovePathCursor( 8 * p, 10 * p)
AddPathLine (12 * p, 10 * p)
StrokePath (p)
;sheet bottom
VectorSourceColor(color)
AddPathBox (p8, size - p4 + p, h, p8 + p16)
StrokePath (2 * p, #PB_Path_RoundCorner)
VectorSourceColor(color3)
AddPathBox (p8, size - p4 + p, h, p8 + p16)
FillPath ()
StrokePath (p)
StopVectorDrawing()
Else
FreeImage(img)
ret = 0
EndIf
EndIf
ProcedureReturn ret
EndProcedure