示例#1
0
		internal void updateData(RectangleF rc, PathData data, float rotation)
		{
			int i;

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

			data.setBounds(rc);
		}
示例#2
0
		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;
		}