/// <summary> /// 判定の描画 /// </summary> /// <returns></returns> public override bool Draw() { if (_endmillis < now.millis) { return(false); } int x = datacalc.ScreenCenterLine; if (now.millis - _startmillis < 100) { MyDraw.SetDrawBlendMode(DX.DX_BLENDMODE_ALPHA, (int)((now.millis - _startmillis) * 2.5)); if (_lr == CdjData.Left) { x -= (int)((100 - now.millis + _startmillis) * 2); } else { x += (int)((100 - now.millis + _startmillis) * 2); } } MyDraw.SetDrawBlendMode(DX.DX_BLENDMODE_NOBLEND, 0); if (_endmillis - now.millis < 250) { MyDraw.SetDrawBlendMode(DX.DX_BLENDMODE_ALPHA, (int)((_endmillis - now.millis))); } GraphicObject o = GraphicObject.GetGraphicObject(enumgraphic); MyDraw.DrawZoomRotate(enumgraphic, new MyDraw.DrawZoomParam(x, (int)(datacalc.JudgeLineY - 20 - o.height * _zoom), _zoom, 0, EnumPriority.JudgeObject)); //if(drawobj != null) //{ // drawobj.DrawZoomRotate(x, (int)(datacalc.JudgeLineY - 20 - drawobj.height * _zoom), _zoom, 0); //} MyDraw.SetDrawBlendMode(DX.DX_BLENDMODE_NOBLEND, 0); return(true); }
/// <summary> /// 左上、右上、右下、左下を指定してそこに変形描画 /// </summary> /// <param name="p1"></param> /// <param name="p2"></param> /// <param name="p3"></param> /// <param name="p4"></param> private static void DrawModi(EnumGraphic enumgraphic, Point p1, Point p2, Point p3, Point p4, int num, EnumPriority priority, EnumBLEND blend, int blendparam) { GraphicObject o = GraphicObject.GetGraphicObject(enumgraphic); MyDraw.DrawModiGraph( p1.X, p1.Y, p2.X, p2.Y, p3.X, p3.Y, p4.X, p4.Y, o.GHandle(frame, num), priority, blend, blendparam); }
/// <summary> /// 配列版の描画Align指定付き /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="num"></param> /// <param name="tmpalign"></param> private static void Draw(EnumGraphic enumgraphic, int x, int y, int num, EnumAlign tmpalign, EnumPriority priority, EnumBLEND blend, int blendparam) { int dx, dy; GraphicObject o = GraphicObject.GetGraphicObject(enumgraphic); if (tmpalign == EnumAlign.NONE) { dx = o.dx; dy = o.dy; } else { o.GetAlignDeltaXY(tmpalign, out dx, out dy); } MyDraw.DrawGraph(x + dx, y + dy, o.GHandle(frame, num), priority, blend, blendparam); }
/// <summary> /// 拡大、回転表示(x,y)が中心座標になるのでalignのDelta(dx,dy)値は無視 /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="zoom">1で元のまま</param> /// <param name="angle">0で元のままラジアン指定</param> private static void DrawZoomRotate(EnumGraphic enumgraphic, int x, int y, double zoom, double angle, int num, EnumPriority priority, EnumBLEND blend, int blendparam) { GraphicObject o = GraphicObject.GetGraphicObject(enumgraphic); MyDraw.DrawRotaGraph(x, y, zoom, angle, o.GHandle(frame, num), priority, blend, blendparam); }
/// <summary> /// 配列版の描画(上一部分だけ描画 /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <param name="num">配列番号</param> private static void DrawUpperRect(EnumGraphic enumgraphic, int x, int y, int num, int upperheight, EnumPriority priority, EnumBLEND blend, int blendparam) { GraphicObject o = GraphicObject.GetGraphicObject(enumgraphic); MyDraw.DrawRectGraph(x + o.dx, y + o.dy, 0, 0, o.width, upperheight, o.GHandle(frame, num), priority, blend, blendparam); }