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 188215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:58:01+00:00 2026-05-11T15:58:01+00:00

They say, that there is a Stack that saves graphic states. Well, I am

  • 0

They say, that there is a Stack that saves graphic states. Well, I am not sure what they mean by that term. Does the CGContextSaveGState save the current drawing I made, or does it save the drawing settings I currently have, like color, line width, font size, etc.?

  • 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. 2026-05-11T15:58:02+00:00Added an answer on May 11, 2026 at 3:58 pm

    The CGContextSaveGState documentation explicitly states what is saved in the state.

    Each graphics context maintains a stack of graphics states. Note that not all aspects of the current drawing environment are elements of the graphics state. For example, the current path is not considered part of the graphics state and is therefore not saved when you call the CGContextSaveGState function. The graphics state parameters that are saved are:

    • CTM (current transformation matrix)
    • clip region
    • image interpolation quality
    • line width
    • line join
    • miter limit
    • line cap
    • line dash
    • flatness
    • should anti-alias
    • rendering intent
    • fill color space
    • stroke color space
    • fill color
    • stroke color
    • alpha value
    • font
    • font size
    • character spacing
    • text drawing mode
    • shadow parameters
    • the pattern phase
    • the font smoothing parameter
    • blend mode

    So no, the drawing you have done is not saved (though it is not cleared, either). Instead, many of the graphics state parameters are saved. You can then restore to the state at which you saved by calling CGContextRestoreGState.

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

Sidebar

Related Questions

I just want to show more than one Watch window. There, they say that
I have read a document that they say: In java there two types of
when I read document about asyntask , they say that: should not update UI
Warning: you know how they say there's not such thing as a stupid question?
In the Apple Docs, they say that NSDateFormatter uses the Unicode for spec. I've
Many people have argued about function size. They say that functions in general should
In the newest version of ADT (version 20 preview 3), they say that it's
This is the same question for older version of Scala, but they say that
Say I have two Java apps that I wrote: Ping.jar and Pong.jar and they
Let's say we have two objects. Furthermore, let's assume that they really have no

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.