HSP¥Ý¡¼¥¿¥ë
¥µ¥¤¥È¥Þ¥Ã¥× ¤ªÌ䤤¹ç¤ï¤»


HSPTV!·Ç¼¨ÈÄ


̤²ò·è ²ò·è Ää»ß ºï½üÍ×ÀÁ

2015
0807
¤Ú¤íÊ£¿ô¤ÎÆ©²á½èÍý1²ò·è


¤Ú¤í

¥ê¥ó¥¯

2015/8/7(Fri) 02:44:21|NO.70537

¸½ºß¥á¥¤¥ó²èÌ̤ÇÉÁ²è¤·¤¿¿Þ·Á¤ò¥µ¥Ö²èÌ̤ËÆ©²á¤·¤Æ¥³¥Ô¡¼¤ò¤·¤è¤¦¤È¤·¤Æ¤¤¤Þ¤¹¡£
ÆâÍƤÏ
­¡¡¡¥á¥¤¥ó¤ÇÉÁ²è¤·¤¿ÇØ·Ê¿§¤òÆ©ÌÀ¿§¤Ë¤¹¤ë (´°Á´¤ËÆ©ÌÀ²½¤µ¤ì¤Æ¸«¤¨¤Ê¤¤¾õÂÖ)
­¢¡¡¥á¥¤¥ó¤ÇÉÁ²è¤·¤¿¿Þ·Á¤ÏÆ©ÌÀ¿§ÉÕ¤­¤Ë¤¹¤ë (Æ©ÌÀÅÙ¤ò»ØÄꤷ¤Æ¡¢È¾Æ©ÌÀ¤Ë¤¹¤ë)

­¡¡¢­¢¤Î½èÍý¤¬ºÑ¤ó¤À¾õÂ֤ǥµ¥Ö²èÌ̤˥³¥Ô¡¼¤ò¤·¤¿¤¤¤Î¤Ç¤¹¤¬
²¿¤ò¤¹¤ì¤Ð¤¤¤¤¤Î¤«Ê¬¤«¤ê¤Þ¤»¤ó¡£
Artlet2D¤ò»È¤Ã¤ÆÆ©²á¤ò»î¤ß¤¿¤Î¤Ç¤¹¤¬²èÌ̤Ëɽ¼¨¤µ¤¨Ìµ¤¤¾õÂ֤Ǥ¹¡£
·ë²Ì¡¢¥µ¥Ö²èÌ̤˥³¥Ô¡¼¤·¤¿ºÝ¡¢¥á¥¤¥ó²èÌ̤ÇÉÁ²è¤·¤¿ÇطʤÏÆ©ÌÀ¡¢¿Þ·Á¤ÏȾƩÌÀ¤Ç¥³¥Ô¡¼¤Ç¤­¤ì¤ÐÎɤ¤¤Ç¤¹¡£


3¡¤4»þ´Ö¤ä¤Ã¤Æ·ë²Ìʬ¤«¤é¤Ê¤¤¤Þ¤Þ¤Ê¤Î¤Ç¼ÁÌ䤵¤»¤Æ夭¤Þ¤·¤¿¡£
¤´¶µ¼¨Äº¤±¤ì¤Ð¤Ê¤È»×¤¤¤Þ¤¹¡£¤è¤í¤·¤¯¤ª´ê¤¤¤·¤Þ¤¹¡£
ÅÓÃæ¤Þ¤Çºî¤ê¾å¤²¤¿¥µ¥ó¥×¥ë¤Ç¤¹¤¬µó¤²¤Æ¤ª¤­¤Þ¤¹¡£



#module ; GDI+ Flat APIs #uselib "gdiplus" #func GdiplusStartup "GdiplusStartup" int, int, int #func GdiplusShutdown "GdiplusShutdown" int #func GdipCreateFromHDC "GdipCreateFromHDC" int, int #func GdipDeleteGraphics "GdipDeleteGraphics" int #func GdipSetSmoothingMode "GdipSetSmoothingMode" int, int #func GdipSetPixelOffsetMode "GdipSetPixelOffsetMode" int, int #func GdipSetClipRectI "GdipSetClipRectI" int, int, int, int, int, int ; Pen / Brush #func GdipCreatePen1 "GdipCreatePen1" int, float, int, int #func GdipCreateSolidFill "GdipCreateSolidFill" int, int #func GdipDeletePen "GdipDeletePen" int #func GdipDeleteBrush "GdipDeleteBrush" int ; Draw (int) #func GdipDrawLineI "GdipDrawLineI" int, int, int, int, int, int #func GdipDrawEllipseI "GdipDrawEllipseI" int, int, int, int, int, int #func GdipFillEllipseI "GdipFillEllipseI" int, int, int, int, int, int ;----------------------------------------------------------- #deffunc gpexit onexit if gdiplusToken { GdipDeletePen gpmPen ; ¥Ú¥ó¤òºï½ü GdipDeleteBrush gpmBrush ; ¥Ö¥é¥·¤òºï½ü GdipDeleteGraphics gpmGraphics ; Graphics ¤òºï½ü GdiplusShutdown gdiplusToken ; GDI+ ½ªÎ» gdiplusToken = 0 } return #deffunc gpinit gpexit if varptr(GdiplusStartup) { gdiplusToken = 0 gsi = 1, 0, 0, 0 GdiplusStartup varptr(gdiplusToken), varptr(gsi), 0 ; GDI+ ³«»Ï gpmGraphics = 0 GdipCreateFromHDC hdc, varptr(gpmGraphics) ; Graphics ºîÀ® (¸½ºß¤Î screen ¤Î hdc) GdipSetSmoothingMode gpmGraphics, 2 ; SmoothingModeHighQuality GdipSetPixelOffsetMode gpmGraphics, 2 ; HighQuality gpmPen = 0 gpmBrush = 0 } return ; color ·ÏÌ¿Îá #define global gpcolor(%1=0, %2=0, %3=0) color %1, %2, %3 : gpcolor_ #define global gphsvcolor(%1=0, %2=0, %3=0) hsvcolor %1, %2, %3 : gpcolor_ #define global gppalcolor(%1=0) palcolor %1 : gpcolor_ #define global gpsyscolor(%1=0) syscolor %1 : gpcolor_ ;----------------------------------------------------------- #deffunc gpcircle_ int p1, int p2, int p3, int p4, int p5 if hdc_bk ! hdc { hdc_bk = hdc gpinit } if gdiplusToken { if gpmPen { GdipDeletePen gpmPen ; ¥Ú¥ó¤òºï½ü GdipDeleteBrush gpmBrush ; ¥Ö¥é¥·¤òºï½ü } ARGB = 0xff000000|(ginfo_r<<16)|(ginfo_g<<8)|ginfo_b ; ARGB (a=100%) GdipCreatePen1 ARGB, 1, 2, varptr(gpmPen) ; ¥Ú¥ó¤òºîÀ® (width=1, unit=2=UnitPixel) GdipCreateSolidFill ARGB, varptr(gpmBrush) ; ¥Ö¥é¥·¤òºîÀ® ; GdipSetClipRectI gpmGraphics, 0, 0, ginfo_winx, ginfo_winy, 0 ; Clip Rect ÀßÄê } if gdiplusToken { if p5 { GdipFillEllipseI gpmGraphics, gpmBrush, p1, p2, p3-p1, p4-p2 } else { GdipDrawEllipseI gpmGraphics, gpmPen, p1, p2, p3-p1, p4-p2 } } else { circle p1, p2, p3, p4, p5 } return ; circle (¥Ñ¥é¥á¡¼¥¿¾ÊάÍÑ¥Þ¥¯¥í) #define global gpcircle(%1=0, %2=0, %3=0, %4=0, %5=1) gpcircle_ %1, %2, %3, %4, %5 #global // ³Ñ´Ý»Í³Ñ·Á¤òÉÁ²è¤¹¤ë #module #define ctype max( %1, %2 ) ( %1 )*( %1 > %2 ) + ( %2 )*( %1 <= %2 ) #define ctype min( %1, %2 ) ( %1 )*( %1 < %2 ) + ( %2 )*( %1 >= %2 ) #const DEFAULT_R 20 /* rboxf (º¸¾åXºÂɸ), (º¸¾åYºÂɸ), (±¦²¼XºÂɸ), (±¦²¼YºÂɸ), (³Ñ¤ÎȾ·Â) */ #deffunc rboxf int _x1, int _y1, int _x2, int _y2, int _r x1 = min(_x1, _x2) : x2 = max(_x1, _x2) y1 = min(_y1, _y2) : y2 = max(_y1, _y2) box_width = x2 - x1 : box_height = y2 - y1 if ( _r <= 0 ) { r = DEFAULT_R } else { r = _r } r = min( r, min( box_width / 2, box_height / 2 ) ) boxf x1, y1+r, x2, y2-r boxf x1+r, y1, x2-r, y2 repeat 4 x = x1 + ( cnt \ 2 ) * ( box_width - r * 2 + 1) y = y1 + ( cnt / 2 ) * ( box_height - r * 2 + 1 ) gpcircle x, y, x + r * 2, y + r * 2 loop return #global #include "a2d.hsp" // ¤³¤³¤Þ¤Ç¤Ç¥â¥¸¥å¡¼¥ë½ª¤ï¤ê // screen 0,300,300,,0,0 : title "¥á¥¤¥ó (0)" screen 1,300,300,,310,0 : title "¥µ¥Ö (1)" // ŬÅö¤ÊÇطʤòºî¤ë repeat 100 color rnd(200),rnd(200),rnd(200) line rnd(300),rnd(300),rnd(300) loop onclick*a stop *a randomize rndcolorR=rnd(254) rndcolorG=rnd(254) rndcolorB=rnd(254) Fx=mousex Fy=mousey repeat -1 gsel 0 redraw 0 color rndcolorR,rndcolorG,rndcolorB : boxf : color 0,0,0 ; ¥á¥¤¥ó¥¦¥£¥ó¥É¥¦¤ÎÇØ·Ê¿§ rboxf Fx, Fy, mousex, mousey, 15 ; ³Ñ¤¬´Ý¤¤Âʱ߷Á¡©¤òÉÁ²è¤¹¤ë (RBGÃÍ = 0,0,0) redraw 1 wait 1 loop



¤³¤Îµ­»ö¤ËÊÖ¿®¤¹¤ë


¤Ú¤í

¥ê¥ó¥¯

2015/8/7(Fri) 23:07:24|NO.70551

¼«¸Ê²ò·è¤·¤Þ¤·¤¿



ONION software Copyright 1997-2023(c) All rights reserved.