This disclosure relates to drawing within a computer environment using a
drawing resource. The computer environment includes a managed code
portion and a native code portion. The computer environment compares a
draw parameter call value being passed from the managed code portion to
the native code portion with a stored drawing resource value stored in
the native code portion. If the draw parameter call value is the same as
the stored drawing resource value, then the computer environment is
configured to draw onto a native drawing surface using the stored drawing
resource. If the draw parameter call value is not the same as the drawing
resource value, then a new drawing resource is created in the managed
code portion. In another aspect, a portion of the drawing resource
feature portion that contains data that describes at least one or more
parameter of the drawing resource is transmitted between the managed code
portion and the native code portion.