We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to do Transparent graphic in Grid Cell

Thread ID:

Created:

Updated:

Platform:

Replies:

117465 Oct 26,2014 12:21 AM Nov 17,2014 02:01 AM WinRT 3
loading
Tags: PDF
Mark Schramm
Asked On October 26, 2014 12:21 AM

I need to put an indicator occasionally into a cell (check box).  I also need to color a row sometimes.  unfortunately I can only figure out how to put JPEG into the cell and they don't do transparency.  A non-transparent JGP looks awful in the Grid.

While I'm at it, is there someway to scale the graphic I'm inserting or does it need to be the right size right from the beginning?

Your help would be appreciated.

KarthikeyanC [Syncfusion]
Replied On October 27, 2014 08:02 AM

Hi Mark,

Thank you for your interest in Syncfusion Products.

 

At present we do have only support for JEPG images to draw in PDF document in WinRT platform. We can scale the graphics by using the below code snippet. Please let us know if you have any concern.

page.Graphics.ScaleTransform(2F, 2F);

 

Thanks,

Karthikeyan.C


Sakthi G [Syncfusion]
Replied On November 16, 2014 11:59 PM

From: Mark Schramm [mailto:markbschramm@hotmail.com]
Sent: Friday, November 14, 2014 5:02 PM
To: Syncfusion Support
Subject: RE: Syncfusion support community forum 117465, How to do Transparent graphic in Grid Cell, has been updated.

 

This scales the entire grid down.

 

I have a Grid.  Inside that grid are 3 columns.  In each of the columns is going to be an icon.  Right now the icon is too big.  Unfortunately the code you provided below scales the entire page and I just want to make the icons fit in the space provided.


KarthikeyanC [Syncfusion]
Replied On November 17, 2014 02:01 AM

Hi Mark,

Thank you for your update.

 

We can save the graphics state and restore this back, please use the below code snippet to implement this.

            //Save the current Graphics State

            PdfGraphicsState gs = page.Graphics.Save();

            //Scale the Graphics

            page.Graphics.ScaleTransform(2F, 2F);

            //Draw the string with scaled graphics

            page.Graphics.DrawString("Hello World", titleFont, PdfBrushes.Black, new PointF(150, 150));

            //Restore graphics to saved state

            page.Graphics.Restore(gs);

            //Draw the string with normal state

            page.Graphics.DrawString("Hello World", titleFont, PdfBrushes.Black, new PointF(250, 150));

 

Regards,

Karthikeyan.C


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;