// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_TranslateTransform method // -------------------------------------------------------------------- public void New_TranslateTransform( string nameOfTransform = Constants.Empty , float x = Constants.X , float y = Constants.Y ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_TranslateTransform); messageSerializer.Add ("NameOfTransform", nameOfTransform); messageSerializer.Add ("X", x); messageSerializer.Add ("Y", y); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_SolidBrush method // -------------------------------------------------------------------- public void New_SolidBrush( string nameOfBrush = Constants.Empty , string color = Constants.White ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_SolidBrush); messageSerializer.Add ("NameOfBrush", nameOfBrush); messageSerializer.Add ("Color", color); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_Text method // -------------------------------------------------------------------- public void New_Text( string nameOfText = Constants.Empty , string nameOfBrush = Constants.Empty , string nameOfFontResource = Constants.Empty , string text = Constants.DefaultText , float x = Constants.X , float y = Constants.Y , float width = Constants.Width , float height = Constants.Height , float opacity = Constants.Opacity ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_Text); messageSerializer.Add ("NameOfText", nameOfText); messageSerializer.Add ("NameOfBrush", nameOfBrush); messageSerializer.Add ("NameOfFontResource", nameOfFontResource); messageSerializer.Add ("Text", text); messageSerializer.Add ("X", x); messageSerializer.Add ("Y", y); messageSerializer.Add ("Width", width); messageSerializer.Add ("Height", height); messageSerializer.Add ("Opacity", opacity); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // Clear_GradientStops method // -------------------------------------------------------------------- public void Clear_GradientStops( string nameOfBrush = Constants.Empty ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.Clear_GradientStops); messageSerializer.Add ("NameOfBrush", nameOfBrush); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_SkewTransform method // -------------------------------------------------------------------- public void New_SkewTransform( string nameOfTransform = Constants.Empty , float angleX = Constants.AngleX , float angleY = Constants.AngleY , float? centerX = null , float? centerY = null ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_SkewTransform); messageSerializer.Add ("NameOfTransform", nameOfTransform); messageSerializer.Add ("AngleX", angleX); messageSerializer.Add ("AngleY", angleY); messageSerializer.Add ("CenterX", centerX); messageSerializer.Add ("CenterY", centerY); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // Set_Object method // -------------------------------------------------------------------- public void Set_Object( string nameOfObject = Constants.Empty , float? x = null , float? y = null , float? width = null , float? height = null , float? opacity = null ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.Set_Object); messageSerializer.Add ("NameOfObject", nameOfObject); messageSerializer.Add ("X", x); messageSerializer.Add ("Y", y); messageSerializer.Add ("Width", width); messageSerializer.Add ("Height", height); messageSerializer.Add ("Opacity", opacity); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // Wait_StateIsPresented method // -------------------------------------------------------------------- public void Wait_StateIsPresented( ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.Wait_StateIsPresented); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_FontResource method // -------------------------------------------------------------------- public void New_FontResource( string nameOfFontResource = Constants.Empty , string fontFamily = Constants.DefaultFont , float fontSize = Constants.DefaultFontSize ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_FontResource); messageSerializer.Add ("NameOfFontResource", nameOfFontResource); messageSerializer.Add ("FontFamily", fontFamily); messageSerializer.Add ("FontSize", fontSize); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_Line method // -------------------------------------------------------------------- public void New_Line( string nameOfLine = Constants.Empty , string nameOfBrush = Constants.Empty , float startX = Constants.StartX , float startY = Constants.StartY , float endX = Constants.EndX , float endY = Constants.EndY , float opacity = Constants.Opacity , float strokeWidth = Constants.StrokeWidth ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_Line); messageSerializer.Add ("NameOfLine", nameOfLine); messageSerializer.Add ("NameOfBrush", nameOfBrush); messageSerializer.Add ("StartX", startX); messageSerializer.Add ("StartY", startY); messageSerializer.Add ("EndX", endX); messageSerializer.Add ("EndY", endY); messageSerializer.Add ("Opacity", opacity); messageSerializer.Add ("StrokeWidth", strokeWidth); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_BitmapResourceFromBytes method // -------------------------------------------------------------------- public void New_BitmapResourceFromBytes( string nameOfBitmapResource = Constants.Empty , byte[] bytes = null , int useFrame = 0 ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_BitmapResourceFromBytes); messageSerializer.Add ("NameOfBitmapResource", nameOfBitmapResource); messageSerializer.Add ("Bytes", bytes); messageSerializer.Add ("UseFrame", useFrame); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_FilledEllipse method // -------------------------------------------------------------------- public void New_FilledEllipse( string nameOfEllipse = Constants.Empty , string nameOfBrush = Constants.Empty , float x = Constants.X , float y = Constants.Y , float width = Constants.Width , float height = Constants.Height , float opacity = Constants.Opacity ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_FilledEllipse); messageSerializer.Add ("NameOfEllipse", nameOfEllipse); messageSerializer.Add ("NameOfBrush", nameOfBrush); messageSerializer.Add ("X", x); messageSerializer.Add ("Y", y); messageSerializer.Add ("Width", width); messageSerializer.Add ("Height", height); messageSerializer.Add ("Opacity", opacity); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_Bitmap method // -------------------------------------------------------------------- public void New_Bitmap( string nameOfBitmap = Constants.Empty , string nameOfBitmapResource = Constants.Empty , float x = Constants.X , float y = Constants.Y , float? width = null , float? height = null , float opacity = Constants.Opacity ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_Bitmap); messageSerializer.Add ("NameOfBitmap", nameOfBitmap); messageSerializer.Add ("NameOfBitmapResource", nameOfBitmapResource); messageSerializer.Add ("X", x); messageSerializer.Add ("Y", y); messageSerializer.Add ("Width", width); messageSerializer.Add ("Height", height); messageSerializer.Add ("Opacity", opacity); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // Clear_Transform method // -------------------------------------------------------------------- public void Clear_Transform( string nameOfTransform = Constants.Empty ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.Clear_Transform); messageSerializer.Add ("NameOfTransform", nameOfTransform); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // Clear_State method // -------------------------------------------------------------------- public void Clear_State( ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.Clear_State); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // Remove_Object method // -------------------------------------------------------------------- public void Remove_Object( string nameOfObject = Constants.Empty ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.Remove_Object); messageSerializer.Add ("NameOfObject", nameOfObject); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_LinearGradientBrush method // -------------------------------------------------------------------- public void New_LinearGradientBrush( string nameOfBrush = Constants.Empty , bool relativeCoordinates = true , string gamma = Constants.Gamma , string extendMode = Constants.ExtendMode , float startX = 0 , float startY = 0 , float endX = 0 , float endY = 1 ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_LinearGradientBrush); messageSerializer.Add ("NameOfBrush", nameOfBrush); messageSerializer.Add ("RelativeCoordinates", relativeCoordinates); messageSerializer.Add ("Gamma", gamma); messageSerializer.Add ("ExtendMode", extendMode); messageSerializer.Add ("StartX", startX); messageSerializer.Add ("StartY", startY); messageSerializer.Add ("EndX", endX); messageSerializer.Add ("EndY", endY); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // Remove_Resource method // -------------------------------------------------------------------- public void Remove_Resource( string nameOfResource = Constants.Empty ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.Remove_Resource); messageSerializer.Add ("NameOfResource", nameOfResource); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_RadialGradientBrush method // -------------------------------------------------------------------- public void New_RadialGradientBrush( string nameOfBrush = Constants.Empty , bool relativeCoordinates = true , string gamma = Constants.Gamma , string extendMode = Constants.ExtendMode , float centerX = 0.5F , float centerY = 0.5F , float offsetX = 0 , float offsetY = 0 , float radiusX = 0.5F , float radiusY = 0.5F ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_RadialGradientBrush); messageSerializer.Add ("NameOfBrush", nameOfBrush); messageSerializer.Add ("RelativeCoordinates", relativeCoordinates); messageSerializer.Add ("Gamma", gamma); messageSerializer.Add ("ExtendMode", extendMode); messageSerializer.Add ("CenterX", centerX); messageSerializer.Add ("CenterY", centerY); messageSerializer.Add ("OffsetX", offsetX); messageSerializer.Add ("OffsetY", offsetY); messageSerializer.Add ("RadiusX", radiusX); messageSerializer.Add ("RadiusY", radiusY); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // Set_Window method // -------------------------------------------------------------------- public void Set_Window( int? x = null , int? y = null , int? width = null , int? height = null , bool clientSize = true , bool? showWindow = null , bool? showFPS = null , string color = null , string title = null ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.Set_Window); messageSerializer.Add ("X", x); messageSerializer.Add ("Y", y); messageSerializer.Add ("Width", width); messageSerializer.Add ("Height", height); messageSerializer.Add ("ClientSize", clientSize); messageSerializer.Add ("ShowWindow", showWindow); messageSerializer.Add ("ShowFPS", showFPS); messageSerializer.Add ("Color", color); messageSerializer.Add ("Title", title); SendMessage (messageSerializer); }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // New_RoundedRectangle method // -------------------------------------------------------------------- public void New_RoundedRectangle( string nameOfRectangle = Constants.Empty , string nameOfBrush = Constants.Empty , float x = Constants.X , float y = Constants.Y , float width = Constants.Width , float height = Constants.Height , float opacity = Constants.Opacity , float radiusX = Constants.RadiusX , float radiusY = Constants.RadiusY , float strokeWidth = Constants.StrokeWidth ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.New_RoundedRectangle); messageSerializer.Add ("NameOfRectangle", nameOfRectangle); messageSerializer.Add ("NameOfBrush", nameOfBrush); messageSerializer.Add ("X", x); messageSerializer.Add ("Y", y); messageSerializer.Add ("Width", width); messageSerializer.Add ("Height", height); messageSerializer.Add ("Opacity", opacity); messageSerializer.Add ("RadiusX", radiusX); messageSerializer.Add ("RadiusY", radiusY); messageSerializer.Add ("StrokeWidth", strokeWidth); SendMessage (messageSerializer); }
void SendMessage(MessageSerializer messageSerializer) { var bytes = messageSerializer.ToBytes (); if (m_session != IntPtr.Zero) { InteractiveGraphics_AcceptMessage ( m_session, bytes.Length, bytes ); } }
// -------------------------------------------------------------------- // -------------------------------------------------------------------- // -------------------------------------------------------------------- // Add_GradientStop method // -------------------------------------------------------------------- public void Add_GradientStop( string nameOfBrush = Constants.Empty , float offset = 0 , string color = Constants.White ) { var messageSerializer = new MessageSerializer (); messageSerializer.Add ("MessageId", (byte)MessageId.Add_GradientStop); messageSerializer.Add ("NameOfBrush", nameOfBrush); messageSerializer.Add ("Offset", offset); messageSerializer.Add ("Color", color); SendMessage (messageSerializer); }