SlideShare a Scribd company logo
1 of 36
ISAS REPORT

    Vector Markup Language

Members of group:
1. Long Van Minh         Class: NSE11101

2. Nguyen Trung Khuong   Faculty : Mr.Tiep

3. Vu Quoc Hoang         Center: NIIT - iNET

4. Nguyen Minh Ngoc
Contents


1   The shape element


2   The fill element


3   The shapetype element


4   The background element
Vector Markup Language

Drawing Charts ?
                        Images
                                      PHP




        JAVA              VML

                                 VB

                   C#
Disadvantages
Vector Markup Language




   Not Work
The Shape elment

Shapes are the building blocks of graphical images
   defined by Vector Markup Language (VML).
 The shape is the top-level element and several
subelements help define the nature of each shape.




      Arc                               Polyline


     Curve                              Rect



      Line                             RoundRect
The Shape element

  This is the top-level element used to describe a
  shape. This element may appear by itself or within a
  <group> element. If a <shapetype> is referenced
  using the type= attribute, any attributes specified in
  the shape will override those found in the shapetype.




<!element shape (%shape.elements;)* >
<!attlist shape %coreattrs; %shapeattrs;
 type cdata #implied -- reference to shapetype --
 adj cdata #implied -- list of adjust values for parameterized
paths --
 path cdata #implied -- string with command set describing a
path - >
The Shape Element




       Stroke
VML




      The Fill Element


Presented: NgocNM
Menu


1   Introduction fill element


2   Table properties


3   Description Attribute


4   Thank you !
Introduction fill element

This sub-element may appear inside
a shape, shapetype, background or most predefined shape
elements to describe how the path should be filled if
something beyond a solid color fill is desired. The
attributes of the fill element can used to describe a
powerful set of image or gradient based fill
patterns. Extensions to the VML fill definition may be
encoded as sub-elements offill.
Table properties
                                   Default
Name Space   Attribute    Type                                              Description
                                    Value

                                              A unique ID that identifies the shape. Used by script to reference the
  VML           id       string     null
                                                                      shape in a collection.

                                              May be "solid | gradient | gradientradial | tile | pattern | frame" "Tile",
                                                "pattern" and "frame" require the image attributes to be supplied.
  VML          type      string    "solid"           "Gradient", "gradientradial" and "gradienttitle" requires
                                             the gradient attributes to be supplied. Types beyond these are specified
                                                                        using sub-elements..

                                             Turns fill display on. Same as fill attribute in shape. This overrides
  VML           on       boolean    true
                                                                      the <shape> fill attribute.

                                               The main fill color. Same as fillcolor attribute in shape. This
  VML         color       color    "white"
                                                          overrides the shape fillcolor attribute.

  VML        opacity     number      1.0                                 Opacity of the fill.
                                             The secondary color for fill when imageType="pattern" or for gradient
  VML         color2      color    "white"
                                                                              fills.
Table properties

                               Attributes related to image fills.


VML      src        string      null              URL to an image to load for image and pattern fills.
                                            The size of the image. Default is pixel size of the image. May be
VML      size      Vector2D   "auto"      specified in CSS absolute units or as a fraction of the path bounding
                                                                             box.
                                           Point relative to upper left corner of the image that is treated as the
VML     origin     Vector2D   "auto"     origin of the image, specified as a fraction of the image size. Default
                                                                 is the center of the image.
                                          Point in the reference rectangle of the shape to position the origin of
VML    position    Vector2D   "auto"       the image, specified as a fraction of the image size. Default is the
                                                               center of the containing block.
                                          "ignore" – ignore aspect issues, "atleast" – image is at least as big as
                                         the imageSize, "atmost" – image is no bigger than imageSize. In each
VML     aspect      string    "ignore"
                                         case, the imageSize attribute will be adjusted to preserve the aspect of
                                                                          the image.
                                         If "true", align the image with the shape else align the image with the
VML   alignshape   boolean      true
                                                                           window.
Table properties
                               Attributes related to gradient fills.


                                           Intermediate colors in the gradient and their relative positions along
                                            the gradient. e.g. "30% red, 70% blue, 90% green". Primary color
VML      colors      string      null
                                               (fillcolorattribute in shape) is 0% and secondary color
                                                                (color2 attribute) is 100%.

VML      angle      number       "0"                      The angle along which the gradient goes


VML      focus      number       "0"         Focus point for linear gradient fill. Values go from –100 to +100.


VML    focussize   Vector2D      0,0                Size of the inner most rectangle for radial gradients


VML   focusposition Vector2D     0,0              Position of the inner most rectangle for radial gradients


VML     method       string    "sigma"                        "none", "linear", "sigma" or "any"
Description Attribute
ID Attribute: A name that provides a unique identifier for a fill. Read/write. String.

Tag Syntax :           <v: element id="expression">
Script Syntax:
element.id="expression"
expression=element.id
Remarks:
Use ID to refer to a specific fill. Once you have created a fill and given it an ID, you can use the ID name
when you want to manipulate the fill.



Example
The shape has a fill ID called "myfill".
<v:shape id="rect01"
coordorigin="0 0" coordsize="200 200"
strokecolor="red"
style="top:1;left:1;width:50;height:50"
path="m 1,1 l 1,200, 200,200, 200,1 x e">
 <v:fill id="myfill"/>
 </v:shape>
Description Attribute
Type Attribute : Determines the type of fill. Read/write. VgFillType.
Tag Syntax :          <v: element type="expression">
Script Syntax :
element.type="expression"
expression=element.type
Remarks: Values include:

Type                         Description
solid                        The fill pattern is solid. Default.
gradient                     The fill colors blend together in a linear gradient from bottom to top.
gradientradial               The fill colors blend together in a radial gradient.
tile                         The fill image is tiled.
pattern                      The image is used to create a pattern using the fill colors.
frame                        The image is stretched to fill the shape.

Example
A red foreground and blue background fill is created using the pattern of the image myimage.gif
   <v:shape id="rect01"
coordorigin="0 0" coordsize="200 200"    strokecolor="red"
style="top:1;left:1;width:50;height:50"
path="m 1,1 l 1,200, 200,200, 200,1 x e">
<v:fill color="red" color2="blue" type="pattern" src="myimage.gif"/>
</v:shape>
Description Attribute
Src Attribute:    Defines the image to load for a fill. Read/write. String.
Tag Syntax :          <v: element src="expression">
Script Syntax:
element.src="expression"
expression=element.src
Remarks
URL to an image to load for image and pattern fills. This attribute must always be present and point to
valid image data for a picture to appear. If this attribute appears alone (that is, no HRef or Title
attribute), then the image is linked.



Example
A tiled image using the file myimage.gif as a source is displayed.
<v:shape id="rect01"
coordorigin="0 0"
coordsize="200 200"
strokecolor="red"
style="top:1;left:1;width:50;height:50"
path="m 1,1 l 1,200, 200,200, 200,1 x e">
<v:fill type="tile" src="myimage.gif"/>
 </v:shape>
Description Attribute
  Color Attribute:     Defines the color of a fill. Read/write. VgColor.
  Tag Syntax :          <v: element color="expression">
  Script Syntax:
  element.color="expression"
  expression=element.color
  Remarks:
  Overrides the FillColor attribute of a shape. The default value is White.




Example
The fill color of the shape is green

   <v:shape id="rect01"
coordorigin="0 0"
coordsize="200 200"
strokecolor="red"
style="top:1;left:1;width:50;height:50"
path="m 1,1 l 1,200, 200,200, 200,1 x e">
<v:fill color="green"/>
        </v:shape>
Description Attribute
Angle Attribute:      Defines the angle of a gradient fill. Read/write. VgAngle.
Tag Syntax :          <v: element angle="expression">
Script Syntax
element.angle="expression"
expression=element.angle
Remarks
The vector of a gradient is perpendicular to the vector of the blend direction from one color to another.
The default value is 0 (zero) degrees, which is a horizontal vector from left to right. Positive angles rotate
the gradient in a counter-clockwise direction.
Example
The fill of the shape is composed of a gradient of two colors, running from blue to red at an
angle of 45 degrees. Red will be in the top left corner and blue will be in the bottom right
corner.
   <v:shape id="rect01"
coordorigin="0 0"
coordsize="200 200"
strokecolor="red"
style="top:1;left:1;width:50;height:50"
path="m 1,1 l 1,200, 200,200, 200,1 x e">
<v:fill type="gradient" color="blue" color2="red" angle="45"/>
</v:shape>
Description Attribute
Method Attribute:   Defines the method used to generate a gradient fill. Read/write. VgSigmaType.
Tag Syntax :       <v: element method="expression">
Script Syntax :
element.method="expression"                     Value         Description
expression=element.method
Remarks:                                        None          No sigma fill.
Values include:
                                                Linear        Linear sigma fill.

                                                Sigma         Sigma fill. Default.

                                                Any           Any sigma fill.


 Example
 The shape will have a red linear gradient fill.
 <v:shape id="rect01"
 coordorigin="0 0"
 coordsize="200 200"
 strokecolor="red"
 style="top:1;left:1;width:50;height:50"
 path="m 1,1 l 1,200, 200,200, 200,1 x e">
 <v:fill color="red" type="gradient" method="linear"/>
  </v:shape>
VML




The Background Element


Presented: HoangVQ
Contents


1         What is VML

2   Description background element

3           Attribute

4        Answer and question
Hot Tip

• What is VML
  – Vector Markup Language (VML) is a
    deprecated XML language used to produce
    vector graphics.
  – VML is used by most Microsoft Office
    applications, such as Microsoft Word,
    Microsoft Visio, etc. within its HTML files,
    created using the 'Save As HTML' option
    (plain HTML or MHT). Such files retain
    complete vector information, and can be
    reopened for editing using other Microsoft
    applications, such as Microsoft PowerPoint.
Background element

                     Description




This element
describes the fill                 <background
of the background                   id=null
of a page using                     fill="true"
vector graphics                     fillcolor="white"
fills.                             />
Attribute

       1                    2                     3

  Id attribute        Fill Attribute      FillColor Attribute

    Provides a          Determines        Defines the brush
unique identifier      whether the        color that fills the
 for an element.    closed path will be    closed path of a
                          filled.              shape.
Attribute

        1                      2                        3

   Id attribute          Fill Attribute        FillColor Attribute
                      Tag Syntax             Tag Syntax
Tag Syntax
                        <v:element filled=     <v:element fillcolor=
 <v:elementname id=
                          "expression">            "expression">
       "idname">
                      Script Syntax          Script Syntax
Script Syntax
                          element.filled=        element.fillcolor=
  elementname.id=
                           "expression"             "expression"
        "idname"
                           expression=              expression=
     expression=
                           element.filled         element.fillcolor
   elementname.id
VECTOR MARKUP LANGUAGE



ShapeType Elements



Presented: KhuongNT
WHAT IS SHAPETYPE ELEMENT

For cases where a shape is to be used multiple
 times on a web page, VML provides the shapetype
 element. A shapetype is essentially a shape
 element which is given an id that can then be
 referenced within another shape element. The
 shape element which references the shapetype id is
 drawn per the attributes of the shapetype unless
 overidden within the shape element itself.
USING SHAPETYPE

If you wanted to draw many shapes that have the
 same or similar properties, it would be tedious if you
 had to repeatedly type the same property attributes
 for each shape. VML provides the <shapetype>
 element so that you can define a prototype of a
 shape. You can then use the <shape> element to
 instantiate many copies of shapes from the same
 shapetype.
3 STEPS TO DEFINE A SHAPETYPE


1. Type a <shapetype> element and give it a name
   by specifying the id attribute.

2. Describe the shapetype by using its property
   attributes or sub-elements.

3. Instantiate a shape by typing a <shape> element,
   and refer the type attribute
CREATE SHAPETYPE WITH ID

 - Type a <shapetype> element and give it a name by
 specifying the id attribute.
DESCRIBE THE SHAPETYPE

 - Then, you alter the shapetype by setting some
 property attributes, such as fillcolor="red"
 strokecolor="blue". Or, you can use sub-elements
 inside the shapetype,
 Such as <path>, <fill>, <stroke> (we will talk about
 those sub-elements in later topics).
INSTANTIATE & OVERWITE

 - Then, you instantiate a shape from the shapetype
 "MyShape" by specifying type="#MyShape", as shown
 in the following VML representation. This shape
 inherits all properties from the shapetype "MyShape",
 and is displayed within its containing box at a size of
 100 by 80.
USING IN MUTIL GROUPS
CODE VML DEMO
VML DEMO WITH IE
Thank you!

More Related Content

Featured

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Vector markup language

  • 1. ISAS REPORT Vector Markup Language Members of group: 1. Long Van Minh Class: NSE11101 2. Nguyen Trung Khuong Faculty : Mr.Tiep 3. Vu Quoc Hoang Center: NIIT - iNET 4. Nguyen Minh Ngoc
  • 2. Contents 1 The shape element 2 The fill element 3 The shapetype element 4 The background element
  • 3. Vector Markup Language Drawing Charts ? Images PHP JAVA VML VB C#
  • 5. The Shape elment Shapes are the building blocks of graphical images defined by Vector Markup Language (VML). The shape is the top-level element and several subelements help define the nature of each shape. Arc Polyline Curve Rect Line RoundRect
  • 6. The Shape element This is the top-level element used to describe a shape. This element may appear by itself or within a <group> element. If a <shapetype> is referenced using the type= attribute, any attributes specified in the shape will override those found in the shapetype. <!element shape (%shape.elements;)* > <!attlist shape %coreattrs; %shapeattrs; type cdata #implied -- reference to shapetype -- adj cdata #implied -- list of adjust values for parameterized paths -- path cdata #implied -- string with command set describing a path - >
  • 8. VML The Fill Element Presented: NgocNM
  • 9. Menu 1 Introduction fill element 2 Table properties 3 Description Attribute 4 Thank you !
  • 10. Introduction fill element This sub-element may appear inside a shape, shapetype, background or most predefined shape elements to describe how the path should be filled if something beyond a solid color fill is desired. The attributes of the fill element can used to describe a powerful set of image or gradient based fill patterns. Extensions to the VML fill definition may be encoded as sub-elements offill.
  • 11. Table properties Default Name Space Attribute Type Description Value A unique ID that identifies the shape. Used by script to reference the VML id string null shape in a collection. May be "solid | gradient | gradientradial | tile | pattern | frame" "Tile", "pattern" and "frame" require the image attributes to be supplied. VML type string "solid" "Gradient", "gradientradial" and "gradienttitle" requires the gradient attributes to be supplied. Types beyond these are specified using sub-elements.. Turns fill display on. Same as fill attribute in shape. This overrides VML on boolean true the <shape> fill attribute. The main fill color. Same as fillcolor attribute in shape. This VML color color "white" overrides the shape fillcolor attribute. VML opacity number 1.0 Opacity of the fill. The secondary color for fill when imageType="pattern" or for gradient VML color2 color "white" fills.
  • 12. Table properties Attributes related to image fills. VML src string null URL to an image to load for image and pattern fills. The size of the image. Default is pixel size of the image. May be VML size Vector2D "auto" specified in CSS absolute units or as a fraction of the path bounding box. Point relative to upper left corner of the image that is treated as the VML origin Vector2D "auto" origin of the image, specified as a fraction of the image size. Default is the center of the image. Point in the reference rectangle of the shape to position the origin of VML position Vector2D "auto" the image, specified as a fraction of the image size. Default is the center of the containing block. "ignore" – ignore aspect issues, "atleast" – image is at least as big as the imageSize, "atmost" – image is no bigger than imageSize. In each VML aspect string "ignore" case, the imageSize attribute will be adjusted to preserve the aspect of the image. If "true", align the image with the shape else align the image with the VML alignshape boolean true window.
  • 13. Table properties Attributes related to gradient fills. Intermediate colors in the gradient and their relative positions along the gradient. e.g. "30% red, 70% blue, 90% green". Primary color VML colors string null (fillcolorattribute in shape) is 0% and secondary color (color2 attribute) is 100%. VML angle number "0" The angle along which the gradient goes VML focus number "0" Focus point for linear gradient fill. Values go from –100 to +100. VML focussize Vector2D 0,0 Size of the inner most rectangle for radial gradients VML focusposition Vector2D 0,0 Position of the inner most rectangle for radial gradients VML method string "sigma" "none", "linear", "sigma" or "any"
  • 14. Description Attribute ID Attribute: A name that provides a unique identifier for a fill. Read/write. String. Tag Syntax : <v: element id="expression"> Script Syntax: element.id="expression" expression=element.id Remarks: Use ID to refer to a specific fill. Once you have created a fill and given it an ID, you can use the ID name when you want to manipulate the fill. Example The shape has a fill ID called "myfill". <v:shape id="rect01" coordorigin="0 0" coordsize="200 200" strokecolor="red" style="top:1;left:1;width:50;height:50" path="m 1,1 l 1,200, 200,200, 200,1 x e"> <v:fill id="myfill"/> </v:shape>
  • 15. Description Attribute Type Attribute : Determines the type of fill. Read/write. VgFillType. Tag Syntax : <v: element type="expression"> Script Syntax : element.type="expression" expression=element.type Remarks: Values include: Type Description solid The fill pattern is solid. Default. gradient The fill colors blend together in a linear gradient from bottom to top. gradientradial The fill colors blend together in a radial gradient. tile The fill image is tiled. pattern The image is used to create a pattern using the fill colors. frame The image is stretched to fill the shape. Example A red foreground and blue background fill is created using the pattern of the image myimage.gif <v:shape id="rect01" coordorigin="0 0" coordsize="200 200" strokecolor="red" style="top:1;left:1;width:50;height:50" path="m 1,1 l 1,200, 200,200, 200,1 x e"> <v:fill color="red" color2="blue" type="pattern" src="myimage.gif"/> </v:shape>
  • 16. Description Attribute Src Attribute: Defines the image to load for a fill. Read/write. String. Tag Syntax : <v: element src="expression"> Script Syntax: element.src="expression" expression=element.src Remarks URL to an image to load for image and pattern fills. This attribute must always be present and point to valid image data for a picture to appear. If this attribute appears alone (that is, no HRef or Title attribute), then the image is linked. Example A tiled image using the file myimage.gif as a source is displayed. <v:shape id="rect01" coordorigin="0 0" coordsize="200 200" strokecolor="red" style="top:1;left:1;width:50;height:50" path="m 1,1 l 1,200, 200,200, 200,1 x e"> <v:fill type="tile" src="myimage.gif"/> </v:shape>
  • 17. Description Attribute Color Attribute: Defines the color of a fill. Read/write. VgColor. Tag Syntax : <v: element color="expression"> Script Syntax: element.color="expression" expression=element.color Remarks: Overrides the FillColor attribute of a shape. The default value is White. Example The fill color of the shape is green <v:shape id="rect01" coordorigin="0 0" coordsize="200 200" strokecolor="red" style="top:1;left:1;width:50;height:50" path="m 1,1 l 1,200, 200,200, 200,1 x e"> <v:fill color="green"/> </v:shape>
  • 18. Description Attribute Angle Attribute: Defines the angle of a gradient fill. Read/write. VgAngle. Tag Syntax : <v: element angle="expression"> Script Syntax element.angle="expression" expression=element.angle Remarks The vector of a gradient is perpendicular to the vector of the blend direction from one color to another. The default value is 0 (zero) degrees, which is a horizontal vector from left to right. Positive angles rotate the gradient in a counter-clockwise direction. Example The fill of the shape is composed of a gradient of two colors, running from blue to red at an angle of 45 degrees. Red will be in the top left corner and blue will be in the bottom right corner. <v:shape id="rect01" coordorigin="0 0" coordsize="200 200" strokecolor="red" style="top:1;left:1;width:50;height:50" path="m 1,1 l 1,200, 200,200, 200,1 x e"> <v:fill type="gradient" color="blue" color2="red" angle="45"/> </v:shape>
  • 19. Description Attribute Method Attribute: Defines the method used to generate a gradient fill. Read/write. VgSigmaType. Tag Syntax : <v: element method="expression"> Script Syntax : element.method="expression" Value Description expression=element.method Remarks: None No sigma fill. Values include: Linear Linear sigma fill. Sigma Sigma fill. Default. Any Any sigma fill. Example The shape will have a red linear gradient fill. <v:shape id="rect01" coordorigin="0 0" coordsize="200 200" strokecolor="red" style="top:1;left:1;width:50;height:50" path="m 1,1 l 1,200, 200,200, 200,1 x e"> <v:fill color="red" type="gradient" method="linear"/> </v:shape>
  • 21. Contents 1 What is VML 2 Description background element 3 Attribute 4 Answer and question
  • 22. Hot Tip • What is VML – Vector Markup Language (VML) is a deprecated XML language used to produce vector graphics. – VML is used by most Microsoft Office applications, such as Microsoft Word, Microsoft Visio, etc. within its HTML files, created using the 'Save As HTML' option (plain HTML or MHT). Such files retain complete vector information, and can be reopened for editing using other Microsoft applications, such as Microsoft PowerPoint.
  • 23. Background element Description This element describes the fill <background of the background id=null of a page using fill="true" vector graphics fillcolor="white" fills. />
  • 24. Attribute 1 2 3 Id attribute Fill Attribute FillColor Attribute Provides a Determines Defines the brush unique identifier whether the color that fills the for an element. closed path will be closed path of a filled. shape.
  • 25. Attribute 1 2 3 Id attribute Fill Attribute FillColor Attribute Tag Syntax Tag Syntax Tag Syntax <v:element filled= <v:element fillcolor= <v:elementname id= "expression"> "expression"> "idname"> Script Syntax Script Syntax Script Syntax element.filled= element.fillcolor= elementname.id= "expression" "expression" "idname" expression= expression= expression= element.filled element.fillcolor elementname.id
  • 26. VECTOR MARKUP LANGUAGE ShapeType Elements Presented: KhuongNT
  • 27. WHAT IS SHAPETYPE ELEMENT For cases where a shape is to be used multiple times on a web page, VML provides the shapetype element. A shapetype is essentially a shape element which is given an id that can then be referenced within another shape element. The shape element which references the shapetype id is drawn per the attributes of the shapetype unless overidden within the shape element itself.
  • 28. USING SHAPETYPE If you wanted to draw many shapes that have the same or similar properties, it would be tedious if you had to repeatedly type the same property attributes for each shape. VML provides the <shapetype> element so that you can define a prototype of a shape. You can then use the <shape> element to instantiate many copies of shapes from the same shapetype.
  • 29. 3 STEPS TO DEFINE A SHAPETYPE 1. Type a <shapetype> element and give it a name by specifying the id attribute. 2. Describe the shapetype by using its property attributes or sub-elements. 3. Instantiate a shape by typing a <shape> element, and refer the type attribute
  • 30. CREATE SHAPETYPE WITH ID  - Type a <shapetype> element and give it a name by specifying the id attribute.
  • 31. DESCRIBE THE SHAPETYPE  - Then, you alter the shapetype by setting some property attributes, such as fillcolor="red" strokecolor="blue". Or, you can use sub-elements inside the shapetype, Such as <path>, <fill>, <stroke> (we will talk about those sub-elements in later topics).
  • 32. INSTANTIATE & OVERWITE  - Then, you instantiate a shape from the shapetype "MyShape" by specifying type="#MyShape", as shown in the following VML representation. This shape inherits all properties from the shapetype "MyShape", and is displayed within its containing box at a size of 100 by 80.
  • 33. USING IN MUTIL GROUPS