Hi,
my small 'media' contribution:
Code:
Declare.i MediaPlay(img.i, size.i, color.i)
Declare.i MediaStop(img.i, size.i, color.i)
Declare.i MediaBegin(img.i, size.i, color.i)
Declare.i MediaEnd(img.i, size.i, color.i)
Declare.i MediaForward(img.i, size.i, color.i)
Declare.i MediaFastForward(img.i, size.i, color.i)
Declare.i MediaBack(img.i, size.i, color.i)
Declare.i MediaFastBack(img.i, size.i, color.i)
Code:
Procedure.i MediaPlay(img.i, size.i, color.i)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color: foreground color
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [by infratec]
Protected ret.i, w.d
w = size / 8.0
ret = CreateImage(img, size, size, 32, #Background)
If img = #PB_Any
img = ret
EndIf
If ret And StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color)
MovePathCursor(2*w, 1*w)
AddPathLine(2*w, 7*w)
AddPathLine(6*w, 4*w)
AddPathLine(2*w, 1*w)
FillPath()
StopVectorDrawing()
Else
FreeImage(ret)
ret = 0
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i MediaStop(img.i, size.i, color.i)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color: foreground color
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [by infratec]
Protected ret.i, w.d
w = size / 8.0
ret = CreateImage(img, size, size, 32, #Background)
If img = #PB_Any
img = ret
EndIf
If ret And StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color)
MovePathCursor(2*w, 1*w)
AddPathLine(2*w, 7*w)
MovePathCursor(5*w, 1*w)
AddPathLine(5*w, 7*w)
StrokePath(1.5*w, #PB_Path_RoundCorner)
StopVectorDrawing()
Else
FreeImage(ret)
ret = 0
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i MediaBegin(img.i, size.i, color.i)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color: foreground color
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [by infratec]
Protected ret.i, w.d
w = size / 8.0
ret = CreateImage(img, size, size, 32, #Background)
If img = #PB_Any
img = ret
EndIf
If ret And StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color)
MovePathCursor(6*w, 1*w)
AddPathLine(6*w, 7*w)
AddPathLine(2*w, 4*w)
AddPathLine(6*w, 1*w)
FillPath()
MovePathCursor(2*w, 1*w)
AddPathLine(2*w, 7*w)
StrokePath(1.5*w, #PB_Path_RoundCorner)
StopVectorDrawing()
Else
FreeImage(ret)
ret = 0
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i MediaEnd(img.i, size.i, color.i)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color: foreground color
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [by infratec]
Protected ret.i, w.d
w = size / 8.0
ret = CreateImage(img, size, size, 32, #Background)
If img = #PB_Any
img = ret
EndIf
If ret And StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color)
MovePathCursor(3*w, 1*w)
AddPathLine(3*w, 7*w)
AddPathLine(7*w, 4*w)
AddPathLine(3*w, 1*w)
FillPath()
MovePathCursor(7*w, 1*w)
AddPathLine(7*w, 7*w)
StrokePath(1.5*w, #PB_Path_RoundCorner)
StopVectorDrawing()
Else
FreeImage(ret)
ret = 0
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i MediaForward(img.i, size.i, color.i)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color: foreground color
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [by infratec]
Protected ret.i, w.d
w = size / 8.0
ret = CreateImage(img, size, size, 32, #Background)
If img = #PB_Any
img = ret
EndIf
If ret And StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color)
MovePathCursor(2*w, 1*w)
AddPathLine(5*w, 4*w)
AddPathLine(2*w, 7*w)
StrokePath(1.5*w, #PB_Path_RoundCorner)
StopVectorDrawing()
Else
FreeImage(ret)
ret = 0
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i MediaFastForward(img.i, size.i, color.i)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color: foreground color
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [by infratec]
Protected ret.i, w.d
w = size / 8.0
ret = CreateImage(img, size, size, 32, #Background)
If img = #PB_Any
img = ret
EndIf
If ret And StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color)
MovePathCursor(1*w, 1*w)
AddPathLine(4*w, 4*w)
AddPathLine(1*w, 7*w)
StrokePath(1.5*w, #PB_Path_RoundCorner)
MovePathCursor(4*w, 1*w)
AddPathLine(7*w, 4*w)
AddPathLine(4*w, 7*w)
StrokePath(1.5*w, #PB_Path_RoundCorner)
StopVectorDrawing()
Else
FreeImage(ret)
ret = 0
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i MediaBack(img.i, size.i, color.i)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color: foreground color
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [by infratec]
Protected ret.i, w.d
w = size / 8.0
ret = CreateImage(img, size, size, 32, #Background)
If img = #PB_Any
img = ret
EndIf
If ret And StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color)
MovePathCursor(5*w, 1*w)
AddPathLine(2*w, 4*w)
AddPathLine(5*w, 7*w)
StrokePath(1.5*w, #PB_Path_RoundCorner)
StopVectorDrawing()
Else
FreeImage(ret)
ret = 0
EndIf
ProcedureReturn ret
EndProcedure
Procedure.i MediaFastBack(img.i, size.i, color.i)
; in : img : number of the image which is to be created, or #PB_Any
; size : width and height (number of pixels)
; color: foreground color
; out: return value: if img = #Pb_Any => number of the created image,
; error => 0
; [by infratec]
Protected ret.i, w.d
w = size / 8.0
ret = CreateImage(img, size, size, 32, #Background)
If img = #PB_Any
img = ret
EndIf
If ret And StartVectorDrawing(ImageVectorOutput(img))
VectorSourceColor(color)
MovePathCursor(4*w, 1*w)
AddPathLine(1*w, 4*w)
AddPathLine(4*w, 7*w)
StrokePath(1.5*w, #PB_Path_RoundCorner)
MovePathCursor(7*w, 1*w)
AddPathLine(4*w, 4*w)
AddPathLine(7*w, 7*w)
StrokePath(1.5*w, #PB_Path_RoundCorner)
StopVectorDrawing()
Else
FreeImage(ret)
ret = 0
EndIf
ProcedureReturn ret
EndProcedure
Code:
#ImgMediaPlay
#ImgMediaStop
#ImgMediaBegin
#ImgMediaEnd
#ImgMediaForward
#ImgMediaFastForward
#ImgMediaBack
#ImgMediaFastBack
Code:
VectorIcons::MediaPlay(#ImgMediaPlay, size, blue)
VectorIcons::MediaStop(#ImgMediaStop, size, blue)
VectorIcons::MediaBegin(#ImgMediaBegin, size, blue)
VectorIcons::MediaEnd(#ImgMediaEnd, size, blue)
VectorIcons::MediaForward(#ImgMediaForward, size, blue)
VectorIcons::MediaFastForward(#ImgMediaFastForward, size, blue)
VectorIcons::MediaBack(#ImgMediaBack, size, blue)
VectorIcons::MediaFastBack(#ImgMediaFastBack, size, blue)
Code:
VectorIcons::MediaPlay(#ImgMediaPlay + #IconCount, size, lightgrey)
VectorIcons::MediaStop(#ImgMediaStop + #IconCount, size, lightgrey)
VectorIcons::MediaBegin(#ImgMediaBegin + #IconCount, size, lightgrey)
VectorIcons::MediaEnd(#ImgMediaEnd + #IconCount, size, lightgrey)
VectorIcons::MediaForward(#ImgMediaForward + #IconCount, size, lightgrey)
VectorIcons::MediaFastForward(#ImgMediaFastForward + #IconCount, size, lightgrey)
VectorIcons::MediaBack(#ImgMediaBack + #IconCount, size, lightgrey)
VectorIcons::MediaFastBack(#ImgMediaFastBack + #IconCount, size, lightgrey)
Bernd