本文整理汇总了C#中System.Windows.Media.GeneralTransform类的典型用法代码示例。如果您正苦于以下问题:C# GeneralTransform类的具体用法?C# GeneralTransform怎么用?C# GeneralTransform使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GeneralTransform类属于System.Windows.Media命名空间,在下文中一共展示了GeneralTransform类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
var transformGroup = new GeneralTransformGroup();
transformGroup.Children.Add(base.GetDesiredTransform(transform));
transformGroup.Children.Add(new TranslateTransform(_currentPoint.X - _startPoint.X, _currentPoint.Y - _startPoint.Y));
return transformGroup;
}
示例2: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
GeneralTransformGroup result = new GeneralTransformGroup();
result.Children.Add(base.GetDesiredTransform(transform));
result.Children.Add(new TranslateTransform(this.left, this.top));
return result;
}
示例3: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
GeneralTransformGroup result = new GeneralTransformGroup();
result.Children.Add(base.GetDesiredTransform(transform));
result.Children.Add(new TranslateTransform(_leftOffset, _topOffset));
return result;
}
示例4: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
GeneralTransformGroup newTransform = new GeneralTransformGroup();
newTransform.Children.Add(base.GetDesiredTransform(transform));
newTransform.Children.Add(new TranslateTransform(this._adornerOffset.X, this._adornerOffset.Y));
return newTransform;
}
示例5: GetDesiredTransform
/// <summary>
/// Forwarded to the annotation component to get desired transform relative to the annotated element
/// </summary>
/// <param name="transform">Transform to adorned element</param>
/// <returns>Transform to annotation component </returns>
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
//if the component is not visual we do not need this
if (!(_annotationComponent is UIElement))
return null;
// Give the superclass a chance to modify the transform
transform = base.GetDesiredTransform(transform);
GeneralTransform compTransform = _annotationComponent.GetDesiredTransform(transform);
//ToDo. if the annotated element is null this component must be unloaded.
//Temporary return null until the PageViewer Load/Unload bug is fixed
//Convert it to an exception after that.
if (_annotationComponent.AnnotatedElement == null)
return null;
if (compTransform == null)
{
// We need to store the element we are registering on. It may not
// be available from the annotation component later.
_annotatedElement = _annotationComponent.AnnotatedElement;
// Wait for valid text view
_annotatedElement.LayoutUpdated += OnLayoutUpdated;
return transform;
}
return compTransform;
}
示例6: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
var group = new TransformGroup();
group.Children.Add((Transform)transform);
group.Children.Add(_tTranslate = new TranslateTransform(HorizontalOffset, VerticalOffset));
return group;
}
示例7: GetBounds
private Rect GetBounds(StylusPoint stylusPoint,
Point position,
IInputElement relativeTo,
GeneralTransform elementToRoot,
GeneralTransform rootToElement)
{
// Get width and heith in pixel value
double width = GetStylusPointWidthOrHeight(stylusPoint, /*isWidth*/ true);
double height = GetStylusPointWidthOrHeight(stylusPoint, /*isWidth*/ false);
// Get the position with respect to root
Point rootPoint;
if (elementToRoot == null ||
!elementToRoot.TryTransform(position, out rootPoint))
{
rootPoint = position;
}
// Create a Rect with respect to root and transform it to element coordinate space
Rect rectBounds = new Rect(rootPoint.X - width * 0.5, rootPoint.Y - height * 0.5, width, height);
if (rootToElement != null)
{
rectBounds = rootToElement.TransformBounds(rectBounds);
}
return rectBounds;
}
示例8: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
GeneralTransformGroup result = new GeneralTransformGroup();
result.Children.Add(base.GetDesiredTransform(transform));
result.Children.Add(new TranslateTransform(position.X, position.Y));
return result;
}
示例9: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
GeneralTransformGroup result = new GeneralTransformGroup();
result.Children.Add (transform);
result.Children.Add (new TranslateTransform (this.offset.X, this.offset.Y));
return result;
}
示例10: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
GeneralTransformGroup group = new GeneralTransformGroup();
group.Children.Add(base.GetDesiredTransform(transform));
group.Children.Add(translate);
return group;
}
示例11: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
var result = new GeneralTransformGroup();
result.Children.Add(base.GetDesiredTransform(transform));
result.Children.Add(new TranslateTransform(_offsetLeft, _offsetTop));
return result;
}
示例12: SinglePageInfo
public SinglePageInfo(double topOffsetInPresenter, double bottomPositionInView, bool intersectsHorizontally, bool intersectsVertically, RadFixedPage page, Rect positionInView, GeneralTransform transformations)
: base(page, positionInView, transformations)
{
this.topOffsetInPresenter = topOffsetInPresenter;
this.bottomPositionInView = bottomPositionInView;
this.intersectsWithViewportVertically = intersectsVertically;
this.intersectsWithViewportHorizontally = intersectsHorizontally;
}
示例13: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
var result = new GeneralTransformGroup();
result.Children.Add(base.GetDesiredTransform(transform));
result.Children.Add(new TranslateTransform(this.MousePosition.X - 4, this.MousePosition.Y - 4));
return result;
}
示例14: GetDesiredTransform
public override GeneralTransform GetDesiredTransform(GeneralTransform transform)
{
GeneralTransformGroup result = new GeneralTransformGroup();
result.Children.Add(base.GetDesiredTransform(transform));
result.Children.Add(new TranslateTransform(
position.X - treeViewEx.ScrollViewer.ContentHorizontalOffset, position.Y - treeViewEx.ScrollViewer.ContentVerticalOffset));
return result;
}
示例15: FixedSOMImage
//--------------------------------------------------------------------
//
// Constructors
//
//---------------------------------------------------------------------
#region Constructors
private FixedSOMImage(Rect imageRect, GeneralTransform trans, Uri sourceUri, FixedNode node, DependencyObject o) : base(node, trans)
{
_boundingRect = trans.TransformBounds(imageRect);
_source = sourceUri;
_startIndex = 0;
_endIndex = 1;
_name = AutomationProperties.GetName(o);
_helpText = AutomationProperties.GetHelpText(o);
}