本文整理匯總了C#中Chunk.SetLocalDestination方法的典型用法代碼示例。如果您正苦於以下問題:C# Chunk.SetLocalDestination方法的具體用法?C# Chunk.SetLocalDestination怎麽用?C# Chunk.SetLocalDestination使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Chunk
的用法示例。
在下文中一共展示了Chunk.SetLocalDestination方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Create
/**
* Create an index entry.
*
* @param text The text.
* @param in1 The first level.
* @param in2 The second level.
* @param in3 The third level.
*/
public void Create(Chunk text, String in1, String in2,
String in3)
{
String tag = "idx_" + (indexcounter++);
text.SetGenericTag(tag);
text.SetLocalDestination(tag);
Entry entry = new Entry(in1, in2, in3, tag, this);
indexentry.Add(entry);
}
示例2: GetChunk
public static Chunk GetChunk(Properties attributes)
{
Chunk chunk = new Chunk();
chunk.Font = FontFactory.GetFont(attributes);
String value;
value = attributes[ElementTags.ITEXT];
if (value != null) {
chunk.Append(value);
}
value = attributes[ElementTags.LOCALGOTO];
if (value != null) {
chunk.SetLocalGoto(value);
}
value = attributes[ElementTags.REMOTEGOTO];
if (value != null) {
String page = attributes[ElementTags.PAGE];
if (page != null) {
chunk.SetRemoteGoto(value, int.Parse(page));
}
else {
String destination = attributes[ElementTags.DESTINATION];
if (destination != null) {
chunk.SetRemoteGoto(value, destination);
}
}
}
value = attributes[ElementTags.LOCALDESTINATION];
if (value != null) {
chunk.SetLocalDestination(value);
}
value = attributes[ElementTags.SUBSUPSCRIPT];
if (value != null) {
chunk.SetTextRise(float.Parse(value, NumberFormatInfo.InvariantInfo));
}
value = attributes[Markup.CSS_KEY_VERTICALALIGN];
if (value != null && value.EndsWith("%")) {
float p = float.Parse(value.Substring(0, value.Length - 1), NumberFormatInfo.InvariantInfo) / 100f;
chunk.SetTextRise(p * chunk.Font.Size);
}
value = attributes[ElementTags.GENERICTAG];
if (value != null) {
chunk.SetGenericTag(value);
}
value = attributes[ElementTags.BACKGROUNDCOLOR];
if (value != null) {
chunk.SetBackground(Markup.DecodeColor(value));
}
return chunk;
}