Code: Select all
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