コード例 #1
0
ファイル: ShapeTemplate.cs プロジェクト: ChrisMoreton/Test3
		internal PathData initData(RectangleF rc, float rotation)
		{
			int i;
			int elementCount = elements.GetLength(0);
			if (decorations != null)
				elementCount += decorations.Length;
			if (textArea != null)
				elementCount += textArea.Length;

			PathData data = new PathData(elementCount);
			for (i = 0; i < elements.GetLength(0); ++i)
				data.setData(i, elements[i].initData(rc, rotation));
			if (decorations != null)
			{
				for (i = 0; i < decorations.Length; i++)
					data.setData(elements.Length + i, decorations[i].initData(rc, rotation));
			}
			if (textArea != null)
			{
				int offset = elements.Length;
				if (decorations != null)
					offset += decorations.Length;
				for (i = 0; i < textArea.Length; i++)
					data.setData(offset + i, textArea[i].initData(rc, rotation));
			}

			data.setBounds(rc);

			return data;
		}