Esempio n. 1
0
        public static sDrawCall solidColorStroke(Order order, ref Matrix3x2 trans, ref StrokeRenderParams srp)
        {
            DrawCallType dc = new DrawCallType(eMesh.Stroked, srp.vaa);

            return(new sDrawCall(dc, ref trans, srp.vaaScaling,
                                 srp.strokeColor, srp.fillColor, srp.lineColorFade,
                                 order));
        }
Esempio n. 2
0
 public static sDrawCall scaledStroke(Order order, ref Matrix3x2 trans, StrokeRenderParams srp, float newPixelSize)
 {
     /* int typeFlags = 0;
      * if( srp.isThinLine )
      *      typeFlags |= 1;
      * if( srp.width <= newPixelSize )
      *      typeFlags |= 2;
      *
      * switch( typeFlags )
      * {
      *      case 0: // Was fat and still fat. Nothing to do here.
      *              {
      *                      Vector4 color = srp.m_color;
      *                      return stroke( eVaaKind.StrokedFat, ref trans, srp.vaaScaling, ref color, order );
      *              }
      *
      *      case 1:
      *              // Was thin, now fat
      *              {
      *                      Vector4 color = srp.m_color;
      *                      float vaaScaling = srp.meshWidth / srp.width;
      *                      return stroke( eVaaKind.StrokedFat, ref trans, vaaScaling, ref color, order );
      *              }
      *      case 2:
      *              // Was fat, now thin
      *              {
      *                      Vector4 color = srp.m_color * ( srp.width / newPixelSize );
      *                      float vaaScaling = 2 * srp.meshWidth / srp.width;
      *                      return stroke( eVaaKind.StrokedThin, ref trans, vaaScaling, ref color, order );
      *              }
      *      case 3:
      *              {
      *                      // Was thin and still thin
      *                      Vector4 color = srp.m_color * ( srp.width / newPixelSize );
      *                      float vaaScaling = MathF.Max( srp.pixel / newPixelSize, 1 );
      *                      return stroke( eVaaKind.StrokedThin, ref trans, vaaScaling, ref color, order );
      *              }
      * }
      * throw new ApplicationException(); */
     throw new NotImplementedException();
 }