public static Microsoft.Xna.Framework.Graphics.Texture2D cropTexture2D(Microsoft.Xna.Framework.Graphics.GraphicsDevice GraphicsDevice, Microsoft.Xna.Framework.Graphics.Texture2D originalTexture, Microsoft.Xna.Framework.Rectangle sourceRectangle) { Microsoft.Xna.Framework.Graphics.Texture2D cropTexture = new Microsoft.Xna.Framework.Graphics.Texture2D(GraphicsDevice, sourceRectangle.Width, sourceRectangle.Height); Microsoft.Xna.Framework.Color[] data = new Microsoft.Xna.Framework.Color[sourceRectangle.Width * sourceRectangle.Height]; originalTexture.GetData(0, sourceRectangle, data, 0, data.Length); cropTexture.SetData(data); return cropTexture; }
/// <inheritdoc /> public void LogEntry(Microsoft.Media.Analytics.ILog log) { if (this.batchingLogAgent == null) return; var aiLog = new Microsoft.Media.AudienceInsight.Log(log.Id, log.TimeStamp, log.Type, log.GetData()); this.batchingLogAgent.LogEntry(aiLog); }
public static STGMEDIUM GetData(Microsoft.VisualStudio.OLE.Interop.IDataObject pDataObject, ref FORMATETC fmtetc) { FORMATETC[] af = new FORMATETC[1]; af[0] = fmtetc; STGMEDIUM[] sm = new STGMEDIUM[1]; pDataObject.GetData(af, sm); fmtetc = af[0]; return sm[0]; }
public override void Render(Microsoft.MapPoint.Rendering3D.Scene.SceneState sceneState) { if (mesh != null) { RenderQueues renderQueues = sceneState.GetData<RenderQueues>(); renderQueues.AddRenderable(mesh); } }
public static STGMEDIUM GetData(Microsoft.VisualStudio.OLE.Interop.IDataObject dataObject, ref FORMATETC fmtetc) { if (dataObject == null) throw new ArgumentNullException("dataObject"); FORMATETC[] af = new FORMATETC[1]; af[0] = fmtetc; STGMEDIUM[] sm = new STGMEDIUM[1]; dataObject.GetData(af, sm); fmtetc = af[0]; return sm[0]; }
void IStylusAsyncPlugin.Packets(RealTimeStylus sender, Microsoft.StylusInput.PluginData.PacketsData data) { int[] intData = data.GetData(); tabletForm.OnTabletPacket(new TabletPacketEventArgs(intData[0], intData[1], intData[2], tabletSettings)); }
public override void Render(Microsoft.MapPoint.Rendering3D.Scene.SceneState sceneState) { if (meshLayers.Count != 0) { CameraData data; if (sceneState.TryGetData<CameraData>(out data)) { RenderQueues renderQueues = sceneState.GetData<RenderQueues>(); lock (meshLayers) { for (int i = 0; i < meshLayers.Count; i++) { if (meshLayers[i].IsVisible) { renderQueues.AddAlphaRenderable(data.Snapshot.Position.Altitude - meshLayers[i].LayerAltitude, meshLayers[i].Mesh); } } } } } }
public override void Render(Microsoft.MapPoint.Rendering3D.Scene.SceneState sceneState) { if (meshLayers.Count != 0) { CameraData data; if (sceneState.TryGetData<CameraData>(out data)) { RenderQueues renderQueues = sceneState.GetData<RenderQueues>(); foreach (MeshLayer meshLayer in meshLayers) { if (meshLayer.IsVisible) { renderQueues.AddRenderable(meshLayer.Mesh); } } } } }