小编Wil*_*ead的帖子

Where is the inconsistency in this Icomparer that is causing a null reference?

I'm receiving a null object in my custom IComparer implementation despite no null entries in the collection it is being applied to. My understanding is this can be caused by inconsistencies in the IComparer implementation. I cannot spot where this could be happening in the following code.

For reference the intent is that these are sorted by the 'correct' property first, then if they are the same, it sorts based on the 'tiebreakerDelta' property, which sorts closest to zero without …

.net c# compare icomparable icomparer

8
推荐指数
1
解决办法
8510
查看次数

如何计算动作3中给定十六进制颜色的阴影?

我需要一种方法来根据提供的颜色计算较轻的十六进制颜色.我意识到我可以使用颜色转换,但我需要实际值才能生成渐变.

flash actionscript colors actionscript-3

6
推荐指数
3
解决办法
6805
查看次数

如何修改我的代码以通过bezier控制点进行排队?

大家好 -

我正在使用锚点和控制点来使用curveTo创建一个形状.这一切都很好,但是当线不直时,我无法弄清楚如何让我的线穿过控制点的中心(蓝点).

这是我绘制形状的代码:

           // clear old line and draw new / begin fill
        var g:Graphics = graphics;
        g.clear();
        g.lineStyle(2, 0, 1);
        g.beginFill(0x0099FF,.1);

        //move to starting anchor point
        var startX:Number = anchorPoints[0].x;
        var startY:Number = anchorPoints[0].y;
        g.moveTo(startX, startY);

        // Connect the dots
        var numAnchors:Number = anchorPoints.length;
        for (var i:Number=1; i<numAnchors; i++) {

            // curve to next anchor through control
            g.curveTo(controlPoints[i].x,controlPoints[i].y, anchorPoints[i].x, anchorPoints[i].y);

        }
        // Close the loop
        g.curveTo(controlPoints[0].x,controlPoints[0].y,startX,startY);
Run Code Online (Sandbox Code Playgroud)

我正在绘制的形状供参考:

如何修改我的代码,以便直接通过蓝色控制点?

提前致谢!

b

flash bezier drawing actionscript actionscript-3

1
推荐指数
1
解决办法
1240
查看次数