Canvas/Options/OptionsConfig.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace Canvas.Options
{
	public class SizeFWrapper
	{
		// data binding needs object, not struct, therefore this wrapper
		SizeF m_size = SizeF.Empty;
		public object Owner;
		public SizeFWrapper(SizeF size)
		{
			m_size = size;
		}
		public SizeFWrapper(float x, float y)
		{
			m_size = new SizeF(x, y);
		}
		public SizeF SizeF
		{
			get { return m_size; }
			set { m_size = value; }
		}
		public float Width
		{
			get { return m_size.Width; }
			set 
			{ 
				if (value < 0.001f)
					value = 0.001f;
				if (value > 1000f)
					value = 1000f;
				m_size.Width= value; 
			}
		}
		public float Height
		{
			get { return m_size.Height; }
			set 
			{ 
				if (value < 0.001f)
					value = 0.001f;
				if (value > 1000f)
					value = 1000f;
				m_size.Height = value; 
			}
		}
	}
	public class OptionsBackground
	{
		public void CopyFromLayer(BackgroundLayer layer)
		{
			m_color = layer.Color;
		}
		public void CopyToLayer(BackgroundLayer layer)
		{
			layer.Color = m_color;
		}
后面还有 94 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。