Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
about Hardware Images and _DisplayOrder,Help!
#11
bplus's two images converted to svg format which you can plug directly into your program, if you want:

Code: (Select All)
'$Console
$Color:32
Dim As String svgHeader, svgFooter, svgW, svgB
Dim As String svgBc, svgWc, finalSvgB, finalSvgW, svgDef
Dim As Long sImgB, sImgW


'black go stone
svgB = svgB + "<svg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'>" + Chr$(10)
svgB = svgB + "<rect width='40' height='40' fill='white'/>" + Chr$(10)
svgB = svgB + "<defs>" + Chr$(10)
svgB = svgB + "<radialGradient id='sphereGradient' cx='65%' cy='65%' r='60%' fx='80%' fy='80%'>" + Chr$(10)
svgB = svgB + "<stop offset='0%' stop-color='#f5f5f5'/>" + Chr$(10)
svgB = svgB + "<stop offset='40%' stop-color='#b0b0b0'/>" + Chr$(10)
svgB = svgB + "<stop offset='100%' stop-color='#303030'/>" + Chr$(10)
svgB = svgB + "</radialGradient>" + Chr$(10)
svgB = svgB + "<radialGradient id='shadowGradient' cx='50%' cy='50%' r='50%'>" + Chr$(10)
svgB = svgB + "<stop offset='0%' stop-color='rgba(0,0,0,0.4)'/>" + Chr$(10)
svgB = svgB + "<stop offset='100%' stop-color='rgba(0,0,0,0)'/>" + Chr$(10)
svgB = svgB + "</radialGradient>" + Chr$(10)
svgB = svgB + "</defs>" + Chr$(10)
svgB = svgB + "<ellipse cx='20' cy='26' rx='11' ry='3.5' fill='url(#shadowGradient)'/>" + Chr$(10)
svgB = svgB + "<circle cx='20' cy='20' r='12' fill='url(#sphereGradient)'/>" + Chr$(10)
svgB = svgB + "</svg>" + Chr$(10)

'White go stone
svgW = svgW + "<svg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'>" + Chr$(10)
svgW = svgW + "<rect width='40' height='40' fill='white'/>" + Chr$(10)
svgW = svgW + "<defs>" + Chr$(10)
svgW = svgW + "<radialGradient id='whiteSphere' cx='65%' cy='65%' r='60%' fx='80%' fy='80%'>" + Chr$(10)
svgW = svgW + "<stop offset='0%' stop-color='#ffffff'/>" + Chr$(10)
svgW = svgW + "<stop offset='40%' stop-color='#e0e0e0'/>" + Chr$(10)
svgW = svgW + "<stop offset='100%' stop-color='#9a9a9a'/>" + Chr$(10)
svgW = svgW + "</radialGradient>" + Chr$(10)
svgW = svgW + "<radialGradient id='shadowUnder' cx='50%' cy='50%' r='50%'>" + Chr$(10)
svgW = svgW + "<stop offset='0%' stop-color='rgba(0,0,0,0.35)'/>" + Chr$(10)
svgW = svgW + "<stop offset='100%' stop-color='rgba(0,0,0,0)'/>" + Chr$(10)
svgW = svgW + "</radialGradient>" + Chr$(10)
svgW = svgW + "</defs>" + Chr$(10)
svgW = svgW + "<ellipse cx='20' cy='26' rx='11' ry='3.5' fill='url(#shadowUnder)'/>" + Chr$(10)
svgW = svgW + "<circle cx='20' cy='20' r='12' fill='url(#whiteSphere)'/>" + Chr$(10)
svgW = svgW + "</svg>" + Chr$(10)


finalSvgB = svgB
finalSvgW = svgW
'_Echo finalSvgB
'_Echo finalSvgW
sImgB = _LoadImage(finalSvgB, 33, "memory")
sImgW = _LoadImage(finalSvgW, 33, "memory")
't& = _NewImage(800, 600, 32)
'_Dest t&
'Line (0, 0)-(799, 599), Peach, BF
'board_hw& = _CopyImage(t&, 33)
_Dest 0
'_FreeImage t&

Screen _NewImage(800, 600, 32)

'_DisplayOrder _Hardware1 , _Hardware , _Software
Do
_Limit 30
Line (0, 0)-(799, 599), Peach, BF
_PutImage (0, 0), board_hw&
_PutImage (10, 10), sImgW
_PutImage (10, 110), sImgB
' _PutImage (10, 110), sImgB
Line (25, 125)-Step(10, 10), Red, BF
Color Black, 0
_UPrintString (20, 25), "119"

_Display
Loop Until InKey$ = Chr$(27)
_FreeImage sImgW
_FreeImage sImgB
System


I just used your old code, which you posted in the first post to show them. I replaced your old images and plugged in the ones bplus had shared instead. I don't know if you like these butter for go stones, but here they are, just in case. Wink
Reply
#12
And a slightly sexier, glossier version of this stone:

Code: (Select All)
'$Console
$Color:32
Dim As String svgHeader, svgFooter, svgW, svgB
Dim As String svgBc, svgWc, finalSvgB, finalSvgW, svgDef
Dim As Long sImgB, sImgW


'black go stone
svgB = svgB + "<svg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'>" + Chr$(10)
svgB = svgB + "<defs>" + Chr$(10)
' Main black GO stone gradient
svgB = svgB + "<radialGradient id='goBlack' cx='35%' cy='35%' r='65%'>" + Chr$(10)
svgB = svgB + "<stop offset='0%' stop-color='#6a6a6a'/>" + Chr$(10)
svgB = svgB + "<stop offset='45%' stop-color='#2a2a2a'/>" + Chr$(10)
svgB = svgB + "<stop offset='100%' stop-color='#000000'/>" + Chr$(10)
svgB = svgB + "</radialGradient>" + Chr$(10)
' Shadow under the stone
svgB = svgB + "<radialGradient id='goShadow' cx='50%' cy='50%' r='50%'>" + Chr$(10)
svgB = svgB + "<stop offset='0%' stop-color='rgba(0,0,0,0.35)'/>" + Chr$(10)
svgB = svgB + "<stop offset='100%' stop-color='rgba(0,0,0,0)'/>" + Chr$(10)
svgB = svgB + "</radialGradient>" + Chr$(10)
svgB = svgB + "</defs>" + Chr$(10)
' Shadow ellipse
svgB = svgB + "<ellipse cx='20' cy='25.5' rx='11.5' ry='3.8' fill='url(#goShadow)'/>" + Chr$(10)
' The stone itself
svgB = svgB + "<circle cx='20' cy='20' r='12' fill='url(#goBlack)'/>" + Chr$(10)
svgB = svgB + "</svg>" + Chr$(10)





'White go stone
svgW = svgW + "<svg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'>" + Chr$(10)
svgW = svgW + "<defs>" + Chr$(10)
' Main white GO stone gradient
svgW = svgW + "<radialGradient id='goWhite' cx='35%' cy='35%' r='65%'>" + Chr$(10)
svgW = svgW + "<stop offset='0%' stop-color='#ffffff'/>" + Chr$(10)
svgW = svgW + "<stop offset='45%' stop-color='#e8e8e8'/>" + Chr$(10)
svgW = svgW + "<stop offset='100%' stop-color='#b8b8b8'/>" + Chr$(10)
svgW = svgW + "</radialGradient>" + Chr$(10)
' Shadow under the stone
svgW = svgW + "<radialGradient id='goShadow' cx='50%' cy='50%' r='50%'>" + Chr$(10)
svgW = svgW + "<stop offset='0%' stop-color='rgba(0,0,0,0.35)'/>" + Chr$(10)
svgW = svgW + "<stop offset='100%' stop-color='rgba(0,0,0,0)'/>" + Chr$(10)
svgW = svgW + "</radialGradient>" + Chr$(10)
svgW = svgW + "</defs>" + Chr$(10)
' Shadow ellipse
svgW = svgW + "<ellipse cx='20' cy='25.5' rx='11' ry='3.8' fill='url(#goShadow)'/>" + Chr$(10)
' The stone itself
svgW = svgW + "<circle cx='20' cy='20' r='12' fill='url(#goWhite)'/>" + Chr$(10)
svgW = svgW + "</svg>" + Chr$(10)

finalSvgB = svgB
finalSvgW = svgW
'_Echo finalSvgB
'_Echo finalSvgW
sImgB = _LoadImage(finalSvgB, 33, "memory")
sImgW = _LoadImage(finalSvgW, 33, "memory")
't& = _NewImage(800, 600, 32)
'_Dest t&
'Line (0, 0)-(799, 599), Peach, BF
'board_hw& = _CopyImage(t&, 33)
_Dest 0
'_FreeImage t&

Screen _NewImage(800, 600, 32)

'_DisplayOrder _Hardware1 , _Hardware , _Software
Do
    _Limit 30
    Line (0, 0)-(799, 599), Peach, BF
    _PutImage (0, 0), board_hw&
    _PutImage (10, 10), sImgW
    _PutImage (10, 110), sImgB
    '  _PutImage (10, 110), sImgB
    Line (25, 125)-Step(10, 10), Red, BF
    Color Black, 0
    _UPrintString (20, 25), "119"

    _Display
Loop Until InKey$ = Chr$(27)
_FreeImage sImgW
_FreeImage sImgB
System
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Nth problem with hardware images Ikerkaz 9 470 01-23-2026, 02:58 PM
Last Post: bplus
  Hardware images questions Dav 5 460 12-04-2025, 04:18 PM
Last Post: Pete
  Hardware images...Talk to me! Unseen Machine 5 722 09-22-2025, 11:12 PM
Last Post: TempodiBasic
  Transparency with Hardware Images NakedApe 8 1,018 07-10-2025, 09:47 AM
Last Post: Pete
  How does QB64 support saving 8bit images? CMR 4 772 04-27-2025, 04:46 PM
Last Post: CMR

Forum Jump:


Users browsing this thread: