Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7892735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:56:31+00:00 2026-06-03T06:56:31+00:00

I have a shape (the red path below) and i have to apply to

  • 0

I have a shape (the red path below) and i have to apply to this path a TranslateTransform and a ScaleTransform transformation. But if i use the Shape RenderTransform property in this way:

Path MyPath = new Path { Fill = new SolidColorBrush(Colors.Red) };
MyPath.Data = MyPathGeometry;
TransformGroup transf = new TransformGroup();
transf.Children.Add(new TranslateTransform(50, 50));
transf.Children.Add(new ScaleTransform(2, 2));
MyPath.RenderTransform = transf;

I get a drawing of this type:

enter image description here

Instead, if I use DrawingContext PushTransform method in this way:

DrawingVisual MyPath = new DrawingVisual();

using (DrawingContext context = MyPath.RenderOpen()) {
   context.PushTransform(new TranslateTransform(50, 50));
   context.PushTransform(new ScaleTransform(2, 2));
   context.DrawGeometry(Brushes.Red, null, MyPathGeometry);
}

I get a drawing of this type:

enter image description here

Why the two paths are placed in a different way? What is the difference between using PushTransform and RenderTransform? How could i get the same result in both cases?
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:56:32+00:00Added an answer on June 3, 2026 at 6:56 am

    The difference is simply the order in which the transformations are applied.

    In the first case (TransformGroup) you first translate by (50, 50), then scale by (2, 2). In the second case (PushTransform) you first scale, then translate.

    The transformations in a TransformGroup are executed in a sequential, first-in-first-out order, wheras the pushed transforms are executed in a stack-like or last-in-first-out order.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this: shape = (2, 4) # arbitrary, could be 3 dimensions such
Lets say I have an irregular shape in png format.As you know this shape
I have a simple tree which takes the shape below ROOT /\ A B
I have an object: stdClass Object ( [Color] => Red [Shape] => Round [Taste]
I have an array like this: $_SESSION['food'] = array( array( name => apple, shape
I've built this piece of code...(javascript) Now we have a red sphere on the
I have an array made of: old_array=(color red shape circle vote 10) (alternating key/values)
I just can't figure it out. I have this shape in res/drawable/start_light.xml <?xml version=1.0
I have a dataframe df: colour shape 'red' circle 'blue' square 'blue' circle 'green'
I have a Shape inside Canvas , like this: <ScrollViewer> <Border Height=342 Width=470 HorizontalAlignment=Left

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.